KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I guess you can't just do this: $servicePath = $args[0] if(Test-Path -path $servicePath) <-- does not throw in here $block = { write-host $servicePath -foreground "magenta" if((Test-Path -path $servicePath)) { <-- throws here. dowork } } So how can I pass my variables to the scriptblock $block?
Tags (comma-separated)
Save Edits
Cancel