• Can someone tell me why I can't execute the Get-InvalidLogins. I set-location to the folder with all the SQLPSX code and execute as follow

    PS [TPT60P]>.\Get-InvalidLogins

    Unexpected token 'foreach' in expression or statement.

    At C:\Documents and Settings\syoung\My Documents\PowerShell\SQLPSX_1.3\LibrarySmo.ps1:86 char:23

    + $ds.Tables foreach <<<< { $_.Rows}

    Exception calling "Contains" with "1" argument(s): "Key cannot be null.

    Parameter name: key"

    At C:\Documents and Settings\syoung\My Documents\PowerShell\SQLPSX_1.3\Get-InvalidLogins.ps1:75 char:37

    + if (!($__SQLPSXInvalidLogin.Contains( <<<< $sqlserver)))

    Index operation failed; the array index evaluated to null.

    At C:\Documents and Settings\syoung\My Documents\PowerShell\SQLPSX_1.3\Get-InvalidLogins.ps1:80 char:30

    + return $__SQLPSXInvalidLogin[$ <<<< sqlserver]

    [font="Verdana"]Sal Young[/font]
    [font="Verdana"]MCITP Database Administrator[/font]