- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Also, if the $vm variable is not defined inside your Start-Job script, you will have to use the using: qualifier.
The Start-Job creates a new PS environment, your current local variables are not known in that environment.
Start-Job -Name $vm.Name -ArgumentList $using:vm.Name -ScriptBlock ${function: Update-VM}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference