SQL_Hunt
SSC-Dedicated
Points: 33518
More actions
July 13, 2022 at 1:25 pm
#4062757
Hello,
Need to change the SQL service and agent passwords. How to achieve this using a PowerShell script?
Can this be achieved without using Get-WMiObject Win32_service class?
Thanks.
frederico_fonseca
SSCoach
Points: 16164
July 13, 2022 at 4:15 pm
#4062846
hum... I would not do it - use the correct UI https://docs.microsoft.com/en-us/sql/relational-databases/sql-server-configuration-manager?view=sql-server-ver16 as it does a bit more behind the scene - and while you are at it change the accounts to be MSA/GMSA so you don't ever have to change them again!!
for scripting - did you look at https://devblogs.microsoft.com/scripting/use-powershell-to-change-sql-server-service-accounts/
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply