Quantcast
Channel: Windows PowerShell Forum
Viewing all articles
Browse latest Browse all 2562

Create New User Account

$
0
0

Hey guys,

Currently I want remotely create user account to many computers, so I tested on my own computer first.

But when I run the code, the user account only appear in parental controls. I can only see it when I go to computer management to add in the (Member Of) stuff. 

Is it anyway that I can straight see it from my (user account --> Manage account) there?

Here the code:

$Computer = ""
$User = ([ADSI] "WinNT://$Computer").Create("User", "wmiaccount")
$User.SetPassword("123456789")
$User.SetInfo()
$User.Description = "Testing"
$User.FullName = "Testing User"
$User.SetInfo()

THanks for help.


Viewing all articles
Browse latest Browse all 2562

Trending Articles



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