Action 1 (default)
Action Link Click
here to install Windows + Microsoft Updates without rebooting or notifying the user.
Script Type
BigFix Action Script
parameter "PowerShellexe"="{value "Path" of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell" of x64 registry}"
if {exist (value "EnableScripts" of it = "0") of keys "HKLM\Software\Policies\Microsoft\Windows\PowerShell" of native registry}
wait cmd /c reg delete "HKLM\Software\Policies\Microsoft\Windows\PowerShell" /v "EnableScripts" /f
wait cmd /c reg add "HKLM\Software\Policies\Microsoft\Windows\PowerShell" /v "EnableScriptsBackup" /t REG_DWORD /d 00000001 /f
endif
waithidden "{parameter "PowerShellexe"}" -Command "Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted -Force"
waithidden "{parameter "PowerShellexe"}" -Command "Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force"
waithidden "{parameter "PowerShellexe"}" -Command "Install-Module -Name PSWindowsUpdate -RequiredVersion 2.0.0.4 -Force"
waithidden "{parameter "PowerShellexe"}" -Command "Import-Module -Name PSWindowsUpdate -Force"
waithidden "{parameter "PowerShellexe"}" -Command "Get-WindowsUpdate -Install -MicrosoftUpdate -AcceptAll -IgnoreReboot -Confirm:$false"
waithidden "{parameter "PowerShellexe"}" -Command "Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Restricted -Force"
if {exist (value "EnableScriptsbackup" of it = "1") of keys "HKLM\Software\Policies\Microsoft\Windows\PowerShell" of native registry}
wait cmd /c reg delete "HKLM\Software\Policies\Microsoft\Windows\PowerShell" /v "EnableScriptsBackup" /f
wait cmd /c reg add "HKLM\Software\Policies\Microsoft\Windows\PowerShell" /v "EnableScripts" /t REG_DWORD /d 00000000 /f
endif
Success Criteria
This action will be considered successful when the applicability relevance evaluates to false.
Action 2
Action Link Click
here to install Windows + Microsoft Updates and automatically reboot without asking to reboot.
Script Type
BigFix Action Script
parameter "PowerShellexe"="{value "Path" of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell" of x64 registry}"
if {exist (value "EnableScripts" of it = "0") of keys "HKLM\Software\Policies\Microsoft\Windows\PowerShell" of native registry}
wait cmd /c reg delete "HKLM\Software\Policies\Microsoft\Windows\PowerShell" /v "EnableScripts" /f
wait cmd /c reg add "HKLM\Software\Policies\Microsoft\Windows\PowerShell" /v "EnableScriptsBackup" /t REG_DWORD /d 00000001 /f
endif
waithidden "{parameter "PowerShellexe"}" -Command "Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted -Force"
waithidden "{parameter "PowerShellexe"}" -Command "Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force"
waithidden "{parameter "PowerShellexe"}" -Command "Install-Module -Name PSWindowsUpdate -RequiredVersion 2.0.0.4 -Force"
waithidden "{parameter "PowerShellexe"}" -Command "Import-Module -Name PSWindowsUpdate -Force"
waithidden "{parameter "PowerShellexe"}" -Command "Get-WindowsUpdate -Install -MicrosoftUpdate -AcceptAll -AutoReboot -Confirm:$false"
waithidden "{parameter "PowerShellexe"}" -Command "Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Restricted -Force"
if {exist (value "EnableScriptsbackup" of it = "1") of keys "HKLM\Software\Policies\Microsoft\Windows\PowerShell" of native registry}
wait cmd /c reg delete "HKLM\Software\Policies\Microsoft\Windows\PowerShell" /v "EnableScriptsBackup" /f
wait cmd /c reg add "HKLM\Software\Policies\Microsoft\Windows\PowerShell" /v "EnableScripts" /t REG_DWORD /d 00000000 /f
endif
Success Criteria
This action will be considered successful when the applicability relevance evaluates to false.
Action 3
Action Link Click
here to install Windows Updates and automatically reboot without asking to reboot.
Script Type
BigFix Action Script
parameter "PowerShellexe"="{value "Path" of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell" of x64 registry}"
if {exist (value "EnableScripts" of it = "0") of keys "HKLM\Software\Policies\Microsoft\Windows\PowerShell" of native registry}
wait cmd /c reg delete "HKLM\Software\Policies\Microsoft\Windows\PowerShell" /v "EnableScripts" /f
wait cmd /c reg add "HKLM\Software\Policies\Microsoft\Windows\PowerShell" /v "EnableScriptsBackup" /t REG_DWORD /d 00000001 /f
endif
waithidden "{parameter "PowerShellexe"}" -Command "Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted -Force"
waithidden "{parameter "PowerShellexe"}" -Command "Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force"
waithidden "{parameter "PowerShellexe"}" -Command "Install-Module -Name PSWindowsUpdate -RequiredVersion 2.0.0.4 -Force"
waithidden "{parameter "PowerShellexe"}" -Command "Import-Module -Name PSWindowsUpdate -Force"
waithidden "{parameter "PowerShellexe"}" -Command "Get-WindowsUpdate -Install -AcceptAll -AutoReboot -Confirm:$false"
waithidden "{parameter "PowerShellexe"}" -Command "Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Restricted -Force"
if {exist (value "EnableScriptsbackup" of it = "1") of keys "HKLM\Software\Policies\Microsoft\Windows\PowerShell" of native registry}
wait cmd /c reg delete "HKLM\Software\Policies\Microsoft\Windows\PowerShell" /v "EnableScriptsBackup" /f
wait cmd /c reg add "HKLM\Software\Policies\Microsoft\Windows\PowerShell" /v "EnableScripts" /t REG_DWORD /d 00000000 /f
endif
Success Criteria
This action will be considered successful when the applicability relevance evaluates to false.
Action 4
Action Link Click
here to install Windows Updates without rebooting or notifying the user.
Script Type
BigFix Action Script
parameter "PowerShellexe"="{value "Path" of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell" of x64 registry}"
if {exist (value "EnableScripts" of it = "0") of keys "HKLM\Software\Policies\Microsoft\Windows\PowerShell" of native registry}
wait cmd /c reg delete "HKLM\Software\Policies\Microsoft\Windows\PowerShell" /v "EnableScripts" /f
wait cmd /c reg add "HKLM\Software\Policies\Microsoft\Windows\PowerShell" /v "EnableScriptsBackup" /t REG_DWORD /d 00000001 /f
endif
waithidden "{parameter "PowerShellexe"}" -Command "Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted -Force"
waithidden "{parameter "PowerShellexe"}" -Command "Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force"
waithidden "{parameter "PowerShellexe"}" -Command "Install-Module -Name PSWindowsUpdate -RequiredVersion 2.0.0.4 -Force"
waithidden "{parameter "PowerShellexe"}" -Command "Import-Module -Name PSWindowsUpdate -Force"
waithidden "{parameter "PowerShellexe"}" -Command "Get-WindowsUpdate -Install -AcceptAll -IgnoreReboot -Confirm:$false"
waithidden "{parameter "PowerShellexe"}" -Command "Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Restricted -Force"
if {exist (value "EnableScriptsbackup" of it = "1") of keys "HKLM\Software\Policies\Microsoft\Windows\PowerShell" of native registry}
wait cmd /c reg delete "HKLM\Software\Policies\Microsoft\Windows\PowerShell" /v "EnableScriptsBackup" /f
wait cmd /c reg add "HKLM\Software\Policies\Microsoft\Windows\PowerShell" /v "EnableScripts" /t REG_DWORD /d 00000000 /f
endif
Success Criteria
This action will be considered successful when the applicability relevance evaluates to false.
Action 5
Action Link Click
here to go to the TechNet page on this PowerShell module.
Script Type
URL
https://gallery.technet.microsoft.com/scriptcenter/2d191bcd-3308-4edd-9de2-88dff796b0bc/
Action 6
Action Link Click
here to uninstall the PowerShell module.
Script Type
BigFix Action Script
parameter "PowerShellexe"="{value "Path" of key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell" of x64 registry}"
if {exist (value "EnableScripts" of it = "0") of keys "HKLM\Software\Policies\Microsoft\Windows\PowerShell" of native registry}
wait cmd /c reg delete "HKLM\Software\Policies\Microsoft\Windows\PowerShell" /v "EnableScripts" /f
wait cmd /c reg add "HKLM\Software\Policies\Microsoft\Windows\PowerShell" /v "EnableScriptsBackup" /t REG_DWORD /d 00000001 /f
endif
waithidden "{parameter "PowerShellexe"}" -Command "Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted -Force"
waithidden "{parameter "PowerShellexe"}" -Command "Uninstall-Module -Name PSWindowsUpdate -Force"
waithidden "{parameter "PowerShellexe"}" -Command "Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Restricted -Force"
if {exist (value "EnableScriptsbackup" of it = "1") of keys "HKLM\Software\Policies\Microsoft\Windows\PowerShell" of native registry}
wait cmd /c reg delete "HKLM\Software\Policies\Microsoft\Windows\PowerShell" /v "EnableScriptsBackup" /f
wait cmd /c reg add "HKLM\Software\Policies\Microsoft\Windows\PowerShell" /v "EnableScripts" /t REG_DWORD /d 00000000 /f
endif
Success Criteria
This action will be considered successful when the applicability relevance evaluates to false.
Action 7
Action Link Click
here to review this task in the bigfix.me Content Database.
Script Type
URL
https://bigfix.me/cdb/fixlet/25528