Public/Get-NonExpiringPassword.ps1

Function Get-NonExpiringPassword {
    <#
    .Synopsis
        Generates list of accounts who's password does not expire
    .Description
        In a security driven enviroment you need to be able to locate accounts that may pose a security threat.
        This function returns a list of accounts who's passwords do not expire
    .Example
        Get-NonExpiringPassword
        Generates list of accounts who's password does not expire
    .Inputs
        None
    .LINK
        about_functions_advanced
    .LINK
        about_CommonParameters
    #>

    [CmdletBinding(
        SupportsPaging = $true
    )]
    [OutputType('System.Object[]')]
    Param ()
    Begin { }
    Process {
        $accounts = Search-ADAccount -PasswordNeverExpires -UsersOnly -ErrorAction Stop | Where-Object {
            $_.Name -notlike "*service*" -and
            $_.Name -ne "Administrator" -and
            $_.Name -notlike "*svc*" -and
            $_.Name -ne "Guest" -and
            $_.Name -ne "Gast" -and
            $_.Name -notlike "SUPPORT_*" -and
            $_.Name -notlike "IUSR_*" -and
            $_.Name -notlike "IWAM_*" -and
            $_.Name -ne "ASPNET" -and
            $_.Name -notmatch "HealthMailbox" -and
            $_.Name -notlike "DefaultAccount"
        }
    }
    End {
        Return $Accounts
    }
}
Set-Alias -Name Find-NonExpiringPassword -Value Get-NonExpiringPassword -Description "Get Non-Expiring Password" -Option ReadOnly -PassThru -ErrorAction SilentlyContinue