Function passing variables
function abc ($idtag) {
$a = $idtag
}
foreach ($item in $list) {
abc $idtag
write-host $a
}
above code doesnt work. how pass value back?
start here: https://technet.microsoft.com/en-us/scriptcenter/dd793612.aspx?f=255&mspperror=-2147217396
i recommend searching site on basic programming. question generic. return value have pass back. need learn scope
seach functions , scope.
type "help help" , learn use built in system.
those first steps.
\_(ツ)_/
Windows Server > Windows PowerShell
Comments
Post a Comment