Unknown reason for error when running PS script

Does anyone know what’s causing these errors?

I am logged in as Joe Schmo who is a member of “Administrators”

Hi @jwernicke351

The code seems to be ok and I see the user being part of the domain admins. The error is that you don’t have access to create the user. Can you try opening the PowerShell ISE as Administrator by right-clicking it and selecting run as administrator to test?

Ricardo

That was it. Thank you. The script works with no errors. I was thinking that since I was logged in under an account that is a member of Administrators that PowerShell ISE was already running with Administrator rights.

1 Like