Disable powershell modules list

Add list_kbs function
This commit is contained in:
Thomas Lemarchand 2018-11-07 17:19:12 +01:00 committed by Gareth J. Greenaway
parent 05852d0865
commit 09dc09d88d
No known key found for this signature in database
GPG key ID: 10B62F8A7CAD7A41

View file

@ -28,7 +28,7 @@ def __virtual__():
if not salt.utils.platform.is_windows():
return False, 'Only available on Windows systems'
powershell_info = __salt__['cmd.shell_info'](shell='powershell', list_modules=True)
powershell_info = __salt__['cmd.shell_info'](shell='powershell', list_modules=False)
if not powershell_info['installed']:
return False, 'PowerShell not available'
@ -50,3 +50,8 @@ def install(path):
def uninstall(kb):
return __salt__['cmd.run_all']('wusa.exe /uninstall /kb:{0} /quiet /norestart'.format(kb[2:]), ignore_retcode=True)
def list_kbs():
return __salt__['cmd.powershell']('Get-HotFix')