Example my station has SSMS 2008R2 # SQL server ( myserver\inst1) is SQL 2014 STD code executed from station [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.Smo") | out-null$srv = new-Object Microsoft.SqlServer.Management.Smo.Server('myserver\inst1,7889')$svr | fl * -- return empty values for most of properties ( example - I cut most of the properties)OutputCollation : CollationID : Edition : ServiceAccount : ServiceInstanceId : ServiceName : DefaultTextMode : TrueConnectionContext : server=''myserver\inst1'';Trusted_Connection=true;Application Name='SQL Management';multipleactiveresultsets=falseState : Existing1.Why most of the properties empty ? 2. how can filter out output result and return only properties with values something like $svr | where {$_.value -ne ''} | fl *
↧