Microsoft® SQL Server® 2012 Bible

(Ben Green) #1

781


Chapter 30: Confi guring and Managing SQL Server with PowerShell


30


Domain : WORKGROUP
DomainRole : 0
PartOfDomain : False
NumberOfProcessors : 1
SystemType : x64-based PC
TotalPhysicalMemory : 17108058112
UserName : POSHSQL\Aaron.Nelson
Workgroup : WORKGROUP

Name : Microsoft Windows 7 Ultimate
|C:\Windows|\Device\Harddisk0\Partition2
Version : 6.1.7601
FreePhysicalMemory : 11955708
OSLanguage : 1033
OSProductSuite : 256
OSType : 18
ServicePackMajorVersion : 1
ServicePackMinorVersion : 0

Name Capacity DeviceLocator Tag
---- -------- ------------- ---
Physical Memory 4294967296 DIMM 1 Physical Memory 0
Physical Memory 4294967296 DIMM 2 Physical Memory 1
Physical Memory 4294967296 DIMM 3 Physical Memory 2
Physical Memory 4294967296 DIMM 4 Physical Memory 3

Name FreeSpace Size
---- --------- ----
C: 11414634496 119926681600
E: 49521369088 240054693888

SQLTBXP does not respond
SQLTBW7 does not respond
SQLPROD1 does not respond
SQLPROD2 does not respond

SQL Server PowerShell Extensions


There are several different approaches to working with SQL Server from PowerShell; among
them are WMI, the Provider; cmdlets, SMO, and ADO.NET. The SQL Server Provider and its
resulting PSDrive provide some easy ways to get to information inside of your SQL Server
instance. The SQL Server cmdlets that come with SSMS 2012 enable you to do some basic

c30.indd 781c30.indd 781 7/31/2012 9:46:22 AM7/31/2012 9:46:22 AM


http://www.it-ebooks.info
Free download pdf