![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | List AD user with or without an Exchange Mailbox so far I got this GET-QADuser | Get-mailbox I got a red message when the user doesn't have a mailbox associated I'm also looking to delete a mailbox without deleting the AD user, I go this command Remove-mailbox, but it does delete the mailbox and the AD user associated |
My System Specs![]() |
| | #2 (permalink) |
| | Re: List AD user with or without an Exchange Mailbox Hello Personne, Get-QADUser's Identity is not the same as Get-Mailbox's Identity, you need to use foreach and set the -errorAction parameter to silentlyContinue to supress error messages for non mailboxed users Get-QADUser | foreach { Get-Mailbox $_.name -ErrorAction silentlyContinue } On the other hand, exchange has a built-in Get-User cmdlet which you can pipe directly to Get-Mailbox (use -errorAction as above to supress error messages) Get-User | Get-Mailbox -errorAction silentlyContinue --- Shay Levy Windows PowerShell MVP http://blogs.microsoft.co.il/blogs/ScriptFanatic PowerShell Toolbar: http://tinyurl.com/PSToolbar P> so far I got this P> P> GET-QADuser | Get-mailbox P> P> I got a red message when the user doesn't have a mailbox associated P> P> I'm also looking to delete a mailbox without deleting the AD user, I P> go this command Remove-mailbox, but it does delete the mailbox and P> the AD user associated P> |
My System Specs![]() |
| | #3 (permalink) |
| | Re: List AD user with or without an Exchange Mailbox or get-user -Filter {Recipienttype -eq "User"} |
My System Specs![]() |
| | #4 (permalink) |
| | Re: List AD user with or without an Exchange Mailbox Hello Personne, That's much better :-), also set the -ResultSize parameter to 'unlimited' to get the maximum number of user objects. --- Shay Levy Windows PowerShell MVP http://blogs.microsoft.co.il/blogs/ScriptFanatic PowerShell Toolbar: http://tinyurl.com/PSToolbar P> or P> get-user -Filter {Recipienttype -eq "User"} |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Exchange 07 Shell - Export-Mailbox and Disable-Mailbox cmdLETS | PowerShell | |||
| AD GUI - Exchange Advanced Tab, Mailbox rights | PowerShell | |||
| Re: List AD user with or without an Exchange Mailbox | PowerShell | |||
| Deleting A Folder In A User Mailbox In Exchange 2007 | PowerShell | |||
| Creating a new mailbox on Exchange 2007 | PowerShell | |||