Passing a parameter to a Powershell Script

0

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

enter image description here

Cancel
login to comment
0

It looks like you are telling PDQ to run PowerShell via a .ps1 file. If I am understanding you correctly, you need to have the parameter in the .ps1 file or just copy the entire code into the details and setup the parameter there.

Cancel
login to comment

0

I recommend using an Install step. It has a Parameters field.

Cancel
login to comment

0

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

enter image description here

enter image description here

Cancel
login to comment

Reply