Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Function passing variables

$
0
0

Function abc ($IDtag) {

$a = $IDtag

}

foreach ($item in $list) {

abc $IDtag

write-host $a

}

Above code doesnt work. How do I pass the value back? Thanks


Viewing all articles
Browse latest Browse all 6937

Trending Articles