We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compress-archive does not create ZIP file when called via Invoke-Command with the -AsJob parameter specified. see examples below.
#this works fine, of course compress-archive -path "C:\foo" -destinationPath "C:\bar\my.zip" -force
#this works fine, too Start-Job -name "createZIP" -ScriptBlock { compress-archive -path "C:\foo" -destinationPath "C:\bar\my.zip" -force }
#Invoke-Command - this also works fine $PSSession = New-PSSession -ComputerName $servername Invoke-Command -session $PSSession -ScriptBlock { compress-archive -path "C:\foo" -destinationPath "C:\bar\my.zip" -force }
#Invoke-Command with -AsJob - this doesn't work (no zip is created) $PSSession = New-PSSession -ComputerName $servername Invoke-Command -session $PSSession -ScriptBlock { compress-archive -path "C:\foo" -destinationPath "C:\bar\my.zip" -force } -JobName $servername -AsJob
The text was updated successfully, but these errors were encountered:
No branches or pull requests
compress-archive does not create ZIP file when called via Invoke-Command with the -AsJob parameter specified. see examples below.
#this works fine, of course
compress-archive -path "C:\foo" -destinationPath "C:\bar\my.zip" -force
#this works fine, too
Start-Job -name "createZIP" -ScriptBlock { compress-archive -path "C:\foo" -destinationPath "C:\bar\my.zip" -force }
#Invoke-Command - this also works fine
$PSSession = New-PSSession -ComputerName $servername
Invoke-Command -session $PSSession -ScriptBlock { compress-archive -path "C:\foo" -destinationPath "C:\bar\my.zip" -force }
#Invoke-Command with -AsJob - this doesn't work (no zip is created)
$PSSession = New-PSSession -ComputerName $servername
Invoke-Command -session $PSSession -ScriptBlock { compress-archive -path "C:\foo" -destinationPath "C:\bar\my.zip" -force } -JobName $servername -AsJob
The text was updated successfully, but these errors were encountered: