The argument Split-Pathbelow is wrong and should be $delZipExe.
This makes the hash $delZipCmdzero.
I would expect the value WorkingDirectoryto be set by nothing in the hash $delZipCmd.
Why is this happening?
Set-StrictMode -Version latest
$delZipExe = '\\servername\ziptools\SP3DDeliverZips.exe'
$delZipDest = "D:\"
$delZipArgs = @( '/execute',
'/source', '/RAD ', '/debugpdb', '/wait'
)
$delZipCmd = @{ FilePath = $delZipExe;
ArgumentList = $delZipArgs;
NoNewWindow = $true;
WorkingDirectory = (Split-Path $delZipCmd);
Wait = $true;
}
$delZipCmd | ft
source
share