Bare with me as i am new to powershell and is still learning a lot
I’ve come across code like this, the example is just a small snippet of a bigger script:
Example 1
$($User.SamAccountName)
Example 2
$User.SamAccountName
it returns the same thing, the value of $User.SamAccountName. So what is the difference? and why would you write the first example?