Forum Discussion
Luke_Gilmore
Jul 19, 2021Copper Contributor
Commands dont display output when ran in a script
Hi Everyone I have put togeather a few commands to carry out a maciene survey. Each line of code works fine when you run it individually, however when it runs in a script it dosnt output pro...
- Jul 20, 2021II was able to resolve this issue.
It works fine once i piped the output using format table instead of select object
Luke_Gilmore
Jul 19, 2021Copper Contributor
Jul 19, 2021
Try to run your .ps1 with an unrestricted execution policy like this
PowerShell.exe -ExecutionPolicy UnRestricted -File .\script.ps1
and see if you got the intended output.
PowerShell.exe -ExecutionPolicy UnRestricted -File .\script.ps1
and see if you got the intended output.
- Luke_GilmoreJul 20, 2021Copper ContributorII was able to resolve this issue.
It works fine once i piped the output using format table instead of select object - Luke_GilmoreJul 19, 2021Copper Contributor
The same issue occurs