Run powershell script lines directly from BF console

Hi Guys,

Any idea if it’s possible to run a series of powershell commands directly from the console without creating the script in the endpoint.

This option is available for “sh” scripts – may be you have any workaround?

Thanks in advance

it’s not native to the client, but there is a way to do it:

https://bigfix.me/fixlet/details/3860

Hi,

What is the concern with making the script on the endpoint?

Bill

For running simple Powershell commands, I use

run powershell.exe -ExecutionPolicy Bypass -Command "your_powershell_command_goes_here"

This is one I’ve used in the past to run an SCCM client action via PowerShell

runhidden powershell.exe -ExecutionPolicy Bypass -Command "Invoke-WmiMethod -Namespace \"Root\CCM\" -Class SMS_Client -Name TriggerSchedule -ArgumentList \"{{00000000-0000-0000-0000-000000000121}\""