iddisarl
asked on
POWERSHELL Invoke-Command problem with many arguments
Hello,
i have a problem with this powershell code:
how i can pass arg $jobname on the remote command
with this code i always have null for my last argument.
thank you for help
i have a problem with this powershell code:
$jobname=$args[0]
$srvBEname=$args[1]
Invoke-Command -ComputerName $srvBEname-ScriptBlock {
if (!$jobname) { Write-Host "variable is null"; exit(1)}
}-Args $jobname
how i can pass arg $jobname on the remote command
with this code i always have null for my last argument.
thank you for help
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thank you,
it's works with the first code.
regards.
it's works with the first code.
regards.
Open in new window