Scripting. Powershell, VMware, Windows, Active Directory & Exchange. All that kind of stuff…..
RSS icon Email icon Home icon
  • PowerShell 2.0: One Cmdlet at a Time #103 Update-List

    Posted on June 17th, 2010 Jonathan Medd No comments

    Continuing the series looking at new cmdlets available in PowerShell 2.0. This time we look at the Update-List cmdlet.

    What can I do with it?

    Add, Remove or Replace items from a property value of an object. This cmdlet can only update a property when it supports the IList interface. So far this does not include any of the core Windows PowerShell cmdlets – however it does include some of the cmdlets that ship with Exchange 2007 and later.

    Example:

    Add additional email addresses to the Test1 user’s mailbox using the Add parameter of Update-List.

    Get-Mailbox Test1  | Update-List -Property EmailAddresses -Add admin@contoso.com,webmaster@contoso.com
    | Set-Mailbox

    How could I have done this in PowerShell 1.0?

    Shay Levy has a great blog post on dealing with AD / Mailbox accounts with multi-valued attributes.

    1000 things 1% better!

    Leave a reply