Need a PS command to give me a list of suspended accounts there the IPphone field is not null or blank

Komendat Jason 6 Reputation points
2023-08-31T11:55:08.0166667+00:00

Need a PS command to give me a list of suspended accounts there the IPphone field is not null or blank

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
5,817 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,354 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Rich Matheisen 44,621 Reputation points
    2023-08-31T14:55:09.2333333+00:00

    You don't need the "Where-Object" cmdlet to do this.

    Get-ADUser -filter "enabled -eq 'true' -AND ipphone -ne 'null'"
    
    0 comments No comments