def licensed():
    cmd = r'cscript C:\Windows\System32\slmgr.vbs /dli'
    out = __salt__['cmd.run'](cmd)
    return 'License Status: Licensed' in out
Return true if the current machine is licensed correctly
dataset/ETHPy150Open saltstack/salt/salt/modules/win_license.py/licensed