$0$srv = new-Object Microsoft.SqlServer.Management.Smo.Server("(local)")
$d = $srv.ReadErrorLog(0) ## this is to read the current error log, it is the same as $srv.ReadErrorLog(), i.e. no parameter$0
$0$d = $srv.ReadErrorLog(1) ## this is to read the archive 1 error log$0
↧