Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell
PS C:\WINDOWS\system32>
PS C:\WINDOWS\system32> if exist "%ProgramFiles%\Microsoft Office\Office15\ospp.vbs" cd /d "%ProgramFiles%\Microsoft Office\Office15"
At line:1 char:3
+ if exist "%ProgramFiles%\Microsoft Office\Office15\ospp.vbs" cd /d "% ...
+ ~
Missing '(' after 'if' in if statement.
+ CategoryInfo : ParserError:

) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : MissingOpenParenthesisInIfStatement
PS C:\WINDOWS\system32> if exist "%ProgramFiles(x86)%\Microsoft Office\Office15\ospp.vbs" cd /d "%ProgramFiles(x86)%\Microsoft Office\Office15"
At line:1 char:3
+ if exist "%ProgramFiles(x86)%\Microsoft Office\Office15\ospp.vbs" cd ...
+ ~
Missing '(' after 'if' in if statement.
+ CategoryInfo : ParserError:

) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : MissingOpenParenthesisInIfStatement
PS C:\WINDOWS\system32> cscript OSPP.VBS /dstatus>info.txt
Microsoft (R) Windows Script Host Version 5.812
Copyright (C) Microsoft Corporation. All rights reserved.
Input Error: Can not find script file "C:\WINDOWS\system32\OSPP.VBS".
PS C:\WINDOWS\system32> start info.txt
start : This command cannot be run due to the error: The system cannot find the file specified.
At line:1 char:1
+ start info.txt
+ ~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation:

) [Start-Process], InvalidOperationException
+ FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand
PS C:\WINDOWS\system32>