Skip to content

Instantly share code, notes, and snippets.

@RemiEscourrou
RemiEscourrou / Set-PasswordRemotely.ps1
Created August 21, 2019 11:47
Change a password on a remote forest
function Set-PasswordRemotely {
## Change a password on a remote forest.
## Used Get-Credential to avoid password in PSReadLine
## The method above is actually based on NetUserChangePassword function.
## Inspired from @chryzsh
## https://gist.github.com/chryzsh/f814a3d6088c5bc8f1adfafce2eb3779
[CmdletBinding()]