searching for exchangeguid in powershell

Posted on 2007-08-10
Last Modified: 2013-11-05
I am trying to search for a mailbox by using the GUID that is provided to me in an error from MOM.
I am getting an error in powershell but I do not know why.  Here is the following:

[PS] R:\>get-mailbox -resultsize unlimited -domaincontroller |where-object {$_.exchangeguid -eq 027293e0-2600-40d2-96b5-d8b0a7ce63dd}
Unexpected token '2' in expression or statement.
At line:1 char:130
+ get-mailbox -resultsize unlimited -domaincontroller
where-object {$_.exchangeguid -eq 027293e0-2600-40d2- <<<< 96b5-d8b0a7ce63dd}

Can anyone tell me what I am doing wrong?
Question by:lardo
    1 Comment
    LVL 18

    Accepted Solution

    027293e0-2600-40d2-96b5-d8b0a7ce63dd needs to be in ""
    when you do -eq it does and EXACT match

    [PS] R:\>get-mailbox -resultsize unlimited -domaincontroller |where-object {$_.exchangeguid -eq "027293e0-2600-40d2-96b5-d8b0a7ce63dd"}

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Training Course: Java/J2EE and SOA

    This course will cover both core and advanced Java concepts like Database connectivity, Threads, Exception Handling, Collections, JSP, Servlets, XMLHandling, and more. You'll also learn various Java frameworks like Hibernate and Spring.

    It is becoming increasingly popular to have a front-page slider on a web site. Nearly every TV website,  magazine or online news has one on their site, and even some e-commerce sites have one. Today you can use sliders with Joomla, WordPress or …
    It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
    The viewer will learn how to count occurrences of each item in an array.
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    794 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now