Skip to content
TheChatArchiveThe Chat Archive
Claudeclaude-3-5-sonnet-20241022· AnthropicHugging Face LMArena Human Preference 140K

how to look up Exchange Public folder objects in AD using Powershell

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Metallama-4-maverick-17b-128e-instruct’s answer.
  1. User

    how to look up Exchange Public folder objects in AD using Powershell

  2. Claude Assistant

    Here's a PowerShell script to look up Exchange Public Folder objects in Active Directory:

    # Import the Active Directory module if not already loaded
    Import-Module ActiveDirectory
    
    # Search for public folder objects
    Get-ADObject -Filter {objectClass -eq "msExchPublicFolder"} -Properties * | Select-Object Name, distinguishedName, msExchPublicFolderPath
    
    # For more detailed information, you can use:
    Get-ADObject -LDAPFilter "(objectClass=msExchPublicFolder)" -Properties * | Format-List
    

    You can also search for specific public folders by name:

    # Search for a specific public folder
    Get-ADObject -Filter {objectClass -eq "msExchPublicFolder" -and Name -like "*YourFolderName*"} -Properties *
    

    If you need to search in a specific domain or OU:

    # Specify SearchBase for a particular domain/OU
    Get-ADObject -SearchBase "OU=Public Folders,DC=yourdomain,DC=com" -Filter {objectClass -eq "msExchPublicFolder"} -Properties *
    

    Would you like me to explain any specific aspects of these commands or show additional query options?

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.