Advertisement
mike_fal

SMO - Get SQL Log location

Apr 23rd, 2015
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SMO") | Out-Null
  2. $smonode = New-Object Microsoft.SqlServer.Management.Smo.Server
  3. Get-ChildItem -Path $smonode.ErrorLogPath
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement