- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If there are client-side tasks, there will not be an Id property, hence the error.
Try changing those lines to
Get-Task | where{$_.Id} | % {
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference