This line of code:
Get-PSUScript -Name 'Get-T1StaffLeave.ps1' -Integrated | Get-PSUJob -OrderDirection Descending -First 1 -Integrated
… is throwing a NotImplementedException for me.
Get-PSUScript seems to work in isolation, so I’m thinking it’s
Get-PSUJob throwing the exception.
-Integrated switch not implemented yet for
Product: PowerShell Universal
I could be the pipelining. Have you tried splitting the pipe and using a variable? That said, it should work and I’ve opened an issue for it.
Yeah I tried a few approaches, including using a variable and also doing it inline, like this:
Get-PSUJob -Script (Get-PSUScript -Name 'Get-T1StaffLeave.ps1' -Integrated) -OrderDirection Descending -First 1 -Integrated
… but passing -Integrated to Get-PSUJob threw the NotImplementedException every time.
I’ve been able to reproduce and fix this one. It will be in the 2.8.0 release and tonight’s nightly build.