Thursday, January 19, 2017

Powershell New-PS Drive using Administrator credentials. User name or password is incorrect

Sometimes you forget the obvious when your doing scripting.

Although not recommended, I was using powershell to create a new psdrive session using the Administrator.

Problem is that with just Administrator and the password, powershell was complaining about a bad username and password combination.

Since the VM was connected to a development domain I wasn't qualifying the Administrator name therefore confusing powershell.

I add the computername\Administrator and tried again. Much better success

No comments: