I need to run PowerShell script that is working fine when using PowerShell ISE/Shell however I need to run this same command using dos commandline and then It's not working as expected.
PowerShell script/command
Get-FalconUninstallToken -Id <AgentID> -PipelineVariable "<ClientID>,<ClientSecret>" | select uninstall_token | Format-Table -HideTableHeaders -OutVariable MaintToken
Output: 12345567788
If I try the same using commandline I keep getting prompted for ClientID, ClientSecret
powershell.exe -command Get-FalconUninstallToken -Id <clientid> -PipelineVariable "<clientID>,<clientSecret>"
I've tried various other combination but so far not really succeeding any suggestions would be appreciated
I've also tried with PowerShell script instead of -command -File but same result. For some reason when trying this using Dos command prompt the ClientID,ClientSecret paramters are not accepted or I'm doing something not right.
Thx for all the help