When I run this command…
Start-ADTProcess -FilePath "$($adtSession.DirFiles)\Latitude_5420_1.49.0.exe" -SecureArgumentList “/s /f /p=$PSecure /l=$env:windir\Key_Logs\Dell_5420_BIOS_1.49_Install.log” -IgnoreExitCodes '1,2' -PassThru
I get this error…
Start-ADTProcess: A positional parameter cannot be found that accepts argument ‘/s /f /p= /l=C:\windows\Key_Logs\Dell_5420_BIOS_1.49_Install.log'.
But, when I run this…
Start-ADTProcess -FilePath "$($adtSession.DirFiles)\Latitude_5420_1.49.0.exe" -ArgumentList “/s /f /p=$PSecure /l=$env:windir\Key_Logs\Dell_5420_BIOS_1.49_Install.log” -IgnoreExitCodes '1,2' -PassThru
I have no error and everything works.
So the $PSecure variable is an encrypted password, and you can imagine that we wouldn’t want this password showing in the log file; hence -SecureArgumentList.
Any ideas on if there is some sort of syntax issue, or why this doesn’t work with -SecureArgumentList?
