PowerShell & SQL Server

  • Does anyone know why AutoClose, AutoShrink & RecoveryModel will not be listed when the script below is run on any instance? I'm in the process of automating my bread and butter DBA tasks.

    [System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SqlServer.SMO') | out-null

    $s = New-Object ('Microsoft.SqlServer.Management.Smo.Server') "SQLSERVER"

    $dbs=$s.Databases

    $dbs | Get-Member -MemberType Property

  • Additional info...

    I setup powershell on my workstation with no SQL instance installed.

    I have got .Net Framework3.5 Sp1 installed but the powershell is not working as expected.:sick:

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply