Passing a parameter to a Powershell Script
Evening,
I'm trying to deploy a powershell script that needs a parameter. I'm having trouble getting it to accept the parameter. Could someone tell me where to put the parameter? Here is what I have so far. I need to add the parameter -Basic
Thanks
Gareth
-
my 5 cents... easier is to make Powershell Step than use that technet script... Or make multiple steps with different rsat tools and define parameters like IF member of this collection then install this step etc... if you have corp env you need disable temporarily wsus
$currentWU = Get-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "UseWUServer" | select -ExpandProperty UseWUServer Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "UseWUServer" -Value 0 Restart-Service wuauserv Get-WindowsCapability -Name RSAT* -Online | Add-WindowsCapability –Online Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "UseWUServer" -Value $currentWU Restart-Service wuauserv
Please sign in to leave a comment.
Comments
3 comments