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

Storing new user in a variable

$
0
0

I am trying to create a new user and then store it in a variable. Anyone have an idea how I would accomplish this? This is what I have so far but it's just returning null

$user = New-ADUser -Name "EMBTest Account" -GivenName EMBTest -Surname Account -SamAccountName EAccount -AccountPassword $password | Get-ADUser


Viewing all articles
Browse latest Browse all 21975

Trending Articles



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