Hello,
I am doing this to change properties without a foreach loop :
$sql = New-Object ('Microsoft.sqlserver.management.smo.server') .\SQL2005
$sql.Logins | where {$_.DefaultDatabase -eq "master"} | where
{$_.DefaultDatabase = "AdventureWorks"}
is this safe, and is there a better way to do it ?
--
Rudi Bruchez
Consultant independant, MCDBA, MCITP, MCT, MVP SQL Server
http://www.babaluga.com/
http://rudi.developpez.com/


