def licensed():
 cmd = 'cscript C:\\Windows\\System32\\slmgr.vbs /dli'
 out = __salt__['cmd.run'](cmd)
 return ('License Status: Licensed' in out)

def licensed ( ) : cmd = '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 cli example: .