PowerShell, Start-Job, -ScriptBlock = sad panda face

Posted by AaronBertrand on SQL Blog See other posts from SQL Blog or by AaronBertrand
Published on Sat, 29 Jan 2011 22:04:00 GMT Indexed on 2011/01/29 23:30 UTC
Read the original article Hit count: 366

Filed under:
|
|
I am working on a project where I am using PowerShell to collect a lot of performance counters from a lot of servers. More on that later. For now I wanted to highlight an important lesson I learned when trying to use Start-Job to call a PS script using -ScriptBlock and passing in parameters. This could be a comedy of errors if you haven't come across it before, so I thought it might be useful to throw up a quick post about it. To keep things simple, let's say I am calling a script with two parameters,...(read more)

© SQL Blog or respective owner

Related posts about automation

Related posts about powershell