I need to do this for five (5) XenApp servers, for now only one for testing.
PowerShell won’t let me run the below line in bold with the cscript in it.
I get this error:
Microsoft (R) Windows Script Host Version 5.812
Copyright (C) Microsoft Corporation. All rights reserved.
Input Error: There is no file extension in “\x1\C$\Program Files\Microsoft Office\Office16\ospp.vbs \dstatus”.
Press Enter to continue…:
There IS a file extension and it’s changing the forward slash to a back slash.
What’s the right way to call this cscript line in PowerShell??
The call operator does not parse strings so you need to manually ‘tokenize’ the command into pieces with spaces between (no commas). Otherwise the entire line is considered one command rather than a command with additional options/arguments. That’s why you get the file extension error because “… /dstatus” is not an extension.