Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

New-ADUser error

$
0
0

I'm playing around with Get-ADUser and New-ADUser as a method of creating new accounts from template accounts. Here's what I'm running:

Powershell
Get-ADUsertemplate_pa-properties*|new-aduser-nameBloggsJ-whatif

But I'm getting this error:
Text
New-ADUser : Cannot validate argument on parameter 'PrincipalsAllowedToDelegateToAccount'. The argument is null, empty, or an element of the argument collection contains a nullvalue. Supply a collection that does not contain any null values and then try the command again. 

So, I tried to see if limiting the output from Get-ADUser would help (since I'm not explicitly interested in the PrincipalsAllowedToDelegateToAccount property).

Powershell
Get-ADUsertemplate_pa-propertiesCompany,Department,Description,Enabled,Manager,MemberOf,Office,StreetAddress,City,l,physicalDeliveryOfficeName,st,State...

Viewing all articles
Browse latest Browse all 15370

Latest Images

Trending Articles



Latest Images

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