locked
Invoke-Command appears to run from local Documents path RRS feed

  • Question

  • Trying to run a in place upgrade on a windows Server 2008 box with the following line ... but it keeps wanting to default to My Documents for the Unattended.xml file ...   anyone have a trick to have it look at the same folder as the setup.exe ... I have tried giveing it the exact path to the like "'C:\OSUpGrade\Setup.exe' -Argumentlist 'C:\OSUpgrade /unattend:unattend.xml'  but barks back that powershell doesn't understand the command 

    Invoke-Command -ComputerName $comp -ScriptBlock { start-process  'C:\OSUPGrade\setup.exe' -Argumentlist '/unattend:unattend.xml '-Wait }  -ErrorAction Stop

    And it runs setup.exe ok but when parsing the Unattend.xml file it keeps looking in the 

     [setup.exe] UnattendFindAnswerFile: Explicitly provided unattend file [C:\Users\%user%\Documents\unattend.xml] does not exist.

    Any Ideas  ? 

    Monday, September 23, 2019 9:31 PM

Answers