jmair Posted September 20, 2018 Posted September 20, 2018 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.
vimagoes Posted September 20, 2018 Posted September 20, 2018 (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 September 20, 2018 by vimagoes
HPlum78 Posted September 20, 2018 Posted September 20, 2018 (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 September 20, 2018 by HPlum78
HPlum78 Posted September 20, 2018 Posted September 20, 2018 [h=1]Set-ADAccountPassword[/h] That one 1
jmair Posted September 20, 2018 Author Posted September 20, 2018 I'll give that a shot, thanks HPlum78
Davit2005 Posted September 21, 2018 Posted September 21, 2018 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now