Jump to content

Reset AD Password from Machine not on Domain?


Recommended Posts

Posted
Is there a way to run domain CMD lines from a machine that is not on the domain? I need to reset student passwords from a machine that is not on the domain and I'm at a loss for getting an authentication promp to add the domain admin creds.
Posted (edited)

Remote connection to a domain controller? Unless your DC is configured to only accept domain accounts.

I think you can use Invoke command from powershell to connect to your DC using domain credentials, not sure.

Edited by vimagoes
Posted (edited)

$rmtsession = New-PSSession -ComputerName  -credential (Get-Credential)
Invoke-Command $rmtsession -Scriptblock { Import-Module ActiveDirectory }Import-PSSession -Session $rmtsession
Get-ADUser -Identity  | 'The password cmdlet that i can never remember!'

Edited by HPlum78
Posted

Make sure that the credentials file is encrypted and you are not using the administrator account, this should go the same for any domain joined machine as well whilst running any powershell scripts that need such access to the domain.

 

I'd also consider making a special account with delegated permissions for changing passwords only on a specific student OUs and avoid using a Domain Admin accounts at all costs.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...