Need to change a Windows Service logon account with Powershell?
Here’s an easy and quick way to do it:
$strSvcStartScr = Get-WmiObject win32_service -Filter "Name='browser'"
$strSvcStartScr.Change($null,$null,$null,$null,$null,$false,’domain\username’,'password') | Out-Null
All you’ve to do is change the service name on the first line and the domain/username and password on the second.
And….your done!
No comments:
Post a Comment