Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

What does $ (NOT $_) mean when used by itself?

$
0
0

For replacing User attributes with values of other attributes of that same User, I discovered the following script online:

get-aduser User1 -pr supvid, manager | %{set-aduser -identity $_.samaccountname -Replace @{SupvID=$(get-aduser ($_.manager) | %{$_.samaccountname})}

I have 2 questions about the script:

1. What does the "$" mean when used outside the parenthesis - "$(get-aduser...)"

2. Is this the best way to replace attributes with the values of other attributes for an object?



Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>