EDIT::::See very bottom for current state of issue.
In the current set up, a batch file calls a powershell script with the following
powershell D:\path\powershellScript.v32.ps1 arg1 arg2 arg3 arg4
I would like to convert this into a powershell script calling another powershell. However, I'm having issues using start process. This is what I currently have but upon execute I get the following
No application is associated with the specified file for this operation
This is the powershell that is executing
$powershellDeployment = "D:\path\powershellScript.v32.ps1"
$powershellArguments = "arg1 arg2 arg3 arg4"
Start-Process $powershellDeployment -ArgumentList $powershellArguements -verb runas -Wait
EDIT::::::
Due to the help below, I now have the following
$username = "DOMAIN\username"
$passwordPlainText = "password"
$password = ConvertTo-SecureString "$passwordPlainText" -asplaintext -force
$cred = New-Object -TypeName System.Management.Automation.PSCredential -argumentlist $username,$password
$powershellArguments = "D:\path\deploy.code.ps1", "arg1", "arg2", "arg3", "arg4"
Start-Process "powershell.exe" -credential $cred -ArgumentList $powershellArguments
However, when I execute this script from a remote machine I get "access denied" errors, even though the username used has full administrator access to the machine