I'm doing a PS Script for making new users, as I consistently forget things that I'm supposed to do...hah. The script is more complex than this, but this is the part I'm having issues with...
$first = Read-Host 'What is the first name?' $last = Read-Host 'What is the last name?' $fullName = "$first $last" $name = Read-Host 'What is the username?' $pass = "Password!" $PassSec = ConvertTo-SecureString $($pass) -AsPlainText -Force New-ADUser -Name $fullName -AccountPassword $PassSec -ChangePasswordAtLogon $true
Everything works fine, up until the last bit. When it executes that, I get an Access is Denied message. I'm a member of Enterprise Admins, Domain Admins, Account Operators, and Domain Users...do you guys know what might be blocking me?
I've tried using the script while running Powershell as an administrator, I get the same message.
Thanks!