Understanding scope of functions in powershell workflow

前端 未结 4 2091
情歌与酒
情歌与酒 2020-12-16 16:13

Copy and paste the following into a new Powershell ISE script and hit F5:

workflow workflow1{
    \"in workflow1\"
    func1
}
function func1 {
    \"in func         


        
4条回答
  •  情深已故
    2020-12-16 17:10

    You could wrap the functions and their calls inside an InlineScript - which could be a per-system script. Then run that inlinescript inside a foreach -Parallel loop working through the systems you want to query.

提交回复
热议问题