Databases Reference
In-Depth Information
As shown in Figure 5-32, the registry value AuditLevel is now changed to 3 .
Figure 5-32
Besides the registry values, the MSSQLServer registry key also has its own subkeys. To get the subkeys,
use the Get-ChildItem cmdlet:
Get-ChildItem -path MSSQLServer
As shown in Figure 5-33, the subkeys contain information related to the version of the SQL Server, the
FILESTREAM availability on the instance, the startup parameters, and server network configuration
settings.
Figure 5-33
To list all the registry values under these subkeys, run the following command:
Get-ChildItem MSSQLServer | ForEach-Object {Get-ItemProperty $_.PSPath | Select * }
The output is shown in Figure 5-34.
You can ignore the properties prefixed with '' PS .'' These are Windows PowerShell-related proper-
ties. For example, the CurrentVersion subkey has four values — RegisteredOwner , SerialNumber ,
CurrentVersion ,and Language — which provide useful information about the SQL Server instance.
The registry path can be very long, such as HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft
\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQLServer .Asitiscumbersometotypesuch
long paths, you can create a custom Windows PowerShell drive that is rooted in that key by executing
the following command:
New-PSDrive -Name mssqlkey -PSProvider Registry -Root "HKLM\SOFTWARE\Microsoft
\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQLServer"
Get-ChildItem mssqlkey:
Search WWH ::




Custom Search