Access SQL Server Configuration Manager Using PowerShell

Hi PowerShell Team,

Articles on MSDN about accessing SQL Server Configuration Manager through WMI are somewhat vague and do not give any PowerShell examples.  I was wondering how I would access the WMI object for SQL Server Configuration Manager to change service account passwords, as these have to be changed on each machine and not just in Active Directory.  To the best of my knowledge, you are not supposed to change SQL Server service account passwords through the Services object, except of non-active nodes in a cluster.

I would be using this primarily on a Windows 2008 R2 system with SQL Server 2008, 2008 R2, or 2012 installed.

Thanks for the help!

Parents
No Data
Reply
  • You are correct.  I read through this one but missed the most important line:

    $SMOWmiserver = New-Object ('Microsoft.SqlServer.Management.Smo.Wmi.ManagedComputer') 

    I kept seeing articles referencing ManagedComputer, but missed the SqlServer portion at the beginning.  I kept thinking they were trying to change the password through the Windows Services module, which is not the correct place.

    Thanks, and I resolve to read more carefully next time.

Children
No Data