<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">Gary&amp;#39;s $this and that about PowerShell and Exchange</title><subtitle type="html">I am a Microsoft Senior Premier Field Engineer based out of Atlanta, GA.  My focus is on Exchange Server and Powershell.  This blog is mainly to share interesting Powershell script samples and tidbits about Exchange.  I am a Microsoft Certified Master for</subtitle><id>http://blogs.technet.com/b/gary/atom.aspx</id><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/gary/" /><link rel="self" type="application/atom+xml" href="http://blogs.technet.com/b/gary/atom.aspx" /><generator uri="http://telligent.com" version="5.6.50428.7875">Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><updated>2010-02-02T22:49:31Z</updated><entry><title>Is this just wrong? Double Where-Object to use the simplified syntax with –and.</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/gary/archive/2013/05/01/is-this-just-wrong-double-where-object-to-use-the-simplified-syntax-with-and.aspx" /><id>http://blogs.technet.com/b/gary/archive/2013/05/01/is-this-just-wrong-double-where-object-to-use-the-simplified-syntax-with-and.aspx</id><published>2013-05-01T15:14:06Z</published><updated>2013-05-01T15:14:06Z</updated><content type="html">When PowerShell v3 introduced the new simplified syntax for the where-object, at first I really loathed it Get-Process | Where-Object { $_ . ws -gt 100MB } 
 

 can be simplified to this: 

 
 
 Get-Process | Where ws -gt 100MB 
 

 The reason I didn't like it up front was because you still really have to understand the first more complex example because the simplified syntax can only do very simple comparisons.&amp;#160; You cant do complex comparisons like joining two conditions with a –and...(&lt;a href="http://blogs.technet.com/b/gary/archive/2013/05/01/is-this-just-wrong-double-where-object-to-use-the-simplified-syntax-with-and.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3570184" width="1" height="1"&gt;</content><author><name>Gary Siepser</name><uri>http://blogs.technet.com/gary.siepser/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>Upcoming Atlanta-Area PowerShell Event</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/gary/archive/2012/10/17/upcoming-atlanta-area-powershell-event.aspx" /><id>http://blogs.technet.com/b/gary/archive/2012/10/17/upcoming-atlanta-area-powershell-event.aspx</id><published>2012-10-17T19:30:55Z</published><updated>2012-10-17T19:30:55Z</updated><content type="html">Hey folks, I am like the Dos Equis guy. I don't post often, but when I do, its about cool stuff :) 
 Yours truly is going to be delivering two sessions at the upcoming PowerShell Saturday event at the Microsoft Office in Alpharetta. It should be a blast, and went really well in Ohio (Columbus) and North Carolina (Charlotte). Check out in info below. I am pretty sure there are still some more seats left, but don't wait too long! 
 
 -Gary Siepser 
 
 
 
 PowerShell Saturday #003 | October 27...(&lt;a href="http://blogs.technet.com/b/gary/archive/2012/10/17/upcoming-atlanta-area-powershell-event.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3527230" width="1" height="1"&gt;</content><author><name>Gary Siepser</name><uri>http://blogs.technet.com/gary.siepser/ProfileUrlRedirect.ashx</uri></author><category term="Powershell" scheme="http://blogs.technet.com/b/gary/archive/tags/Powershell/" /><category term="Event" scheme="http://blogs.technet.com/b/gary/archive/tags/Event/" /><category term="PowerShell Saturday" scheme="http://blogs.technet.com/b/gary/archive/tags/PowerShell+Saturday/" /></entry><entry><title>I will be delivering a Technical Training Session at the Feb. Meeting of AAUG (Atlanta Active Directory User Group)</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/gary/archive/2012/01/25/i-will-be-delivering-a-technical-training-session-at-the-feb-meeting-of-aaug-atlanta-active-directory-user-group.aspx" /><id>http://blogs.technet.com/b/gary/archive/2012/01/25/i-will-be-delivering-a-technical-training-session-at-the-feb-meeting-of-aaug-atlanta-active-directory-user-group.aspx</id><published>2012-01-25T23:03:56Z</published><updated>2012-01-25T23:03:56Z</updated><content type="html">Hey folks.&amp;#160; I will be delivering a session the MS AD module for PowerShell at the February meeting of AAUG (Atlanta Active Directory User Group).&amp;#160; Its open to all.&amp;#160; These user groups are absolutely great.&amp;#160; I have been started to attend the PowerShell user group in Atlanta when my travel schedule permits.&amp;#160; If you want to see yours truly in action and learn about the AD Module, come on out.&amp;#160; Check out the info on their site: http://aadug.org/UpcomingMeeting.aspx The meeting...(&lt;a href="http://blogs.technet.com/b/gary/archive/2012/01/25/i-will-be-delivering-a-technical-training-session-at-the-feb-meeting-of-aaug-atlanta-active-directory-user-group.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3477278" width="1" height="1"&gt;</content><author><name>Gary Siepser</name><uri>http://blogs.technet.com/gary.siepser/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>Yours Truly was featured as a Guest Blogger on “Hey, Scripting Guy!” on Christmas Eve…</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/gary/archive/2012/01/25/yours-truly-was-featured-as-a-guest-blogger-on-hey-scripting-guy-on-christmas-eve.aspx" /><id>http://blogs.technet.com/b/gary/archive/2012/01/25/yours-truly-was-featured-as-a-guest-blogger-on-hey-scripting-guy-on-christmas-eve.aspx</id><published>2012-01-25T22:58:52Z</published><updated>2012-01-25T22:58:52Z</updated><content type="html">I don’t love doing the whole self promotion thing, but every so often I am proud of something enough to go for it.&amp;#160; This past Christmas eve (Dec 24th…as if you didn’t know the date) “The Scripting Guy” Ed Wilson was nice enough to allow me to write a post for the “Hey Scripting Guy” Blog.&amp;#160; It’s a pretty simple subject, but valuable just the same.&amp;#160; Its about configuring Windows Search to index the actual contents of your PowerShell scripts/modules. Check it out: http://blogs.technet...(&lt;a href="http://blogs.technet.com/b/gary/archive/2012/01/25/yours-truly-was-featured-as-a-guest-blogger-on-hey-scripting-guy-on-christmas-eve.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3477276" width="1" height="1"&gt;</content><author><name>Gary Siepser</name><uri>http://blogs.technet.com/gary.siepser/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>Video Showcasing Microsoft Certified Master Certification and Training Program</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/gary/archive/2011/04/22/video-showcasing-microsoft-certified-master-certification-and-training-program.aspx" /><id>http://blogs.technet.com/b/gary/archive/2011/04/22/video-showcasing-microsoft-certified-master-certification-and-training-program.aspx</id><published>2011-04-22T15:39:48Z</published><updated>2011-04-22T15:39:48Z</updated><content type="html">&lt;p&gt;I went through the MCM program for Exchange 2007 a few years ago.&amp;#160; It was an absolutely great experience.&amp;#160; Don’t get me wrong, I added some grey hair during those three weeks, but it was worth every minute and ounce of energy.&amp;#160; I was fortunate enough to manage to pass all the exams and the qualification lab test on the first pass…which to me was huge.&amp;#160; It means when you leave Seattle to come back home, you are DONE.&amp;#160; It’s a great program run by some great folks.&amp;#160; Its actually sort of funny for me to watch some of the folks in the video below as you get pretty close to the folks you interact with during that time, so now I just laugh at them on video.&amp;#160; Either way though, their message is 100% true on on point!&amp;#160; Check out this video and then fight for your spot to attend the MCM program and become a Master or Architect.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="640" height="360"&gt;
&lt;param name="source" value="http://www.microsoft.com/showcase/silverlight/player/1/player-en.xap" /&gt;
&lt;param name="enableHtmlAccess" value="true" /&gt;	    
&lt;param name="background" value="#FF000000" /&gt;
&lt;param name="allowHtmlPopupwindow" value="true" /&gt;
&lt;param name="minRuntimeVersion" value="4.0.50401.0" /&gt;
&lt;param name="autoUpgrade" value="true" /&gt;
&lt;param name="initParams" value="Culture=en-US,Uuid=eeb37636-e39c-47dc-a58c-c6deeb75fce3,Autoplay=false,ShowMarketingOverlay=true,MiscControls=FullScreen;Detached,ShowMenu=True,Tabs=Embed;Email;Share;Info,VideoUrl=http://microsoft.com/showcase/en/us/details/eeb37636-e39c-47dc-a58c-c6deeb75fce3,Mode=Player" /&gt;
&lt;a href="http://go.microsoft.com/fwlink/?LinkID=149156" style="text-decoration: none;" onmousedown="BLOCKED SCRIPTnew Image().src = 'http://m.webtrends.com/dcsygm2gb10000kf9xm7kfvub_9p1t/dcs.gif?dcsdat=' + new Date().getTime() + '&amp;dcssip=www.microsoft.com&amp;dcsuri=' + window.location.href + '&amp;WT.tz=-8&amp;WT.bh=16&amp;WT.ul=en-US&amp;WT.cd=32&amp;WT.jo=Yes&amp;WT.ti=&amp;WT.js=Yes&amp;WT.jv=1.5&amp;WT.fi=Yes&amp;WT.fv=10.0&amp;WT.sli=Not%20Installed&amp;WT.slv=Version%20Unavailable&amp;WT.dl=1&amp;WT.seg_1=Not%20Logged%20In&amp;WT.vt_f_a=2&amp;WT.vt_f=2&amp;WT.vt_nvr1=2&amp;WT.vt_nvr2=2&amp;WT.vt_nvr3=2&amp;WT.vt_nvr4=2&amp;vp_site=Embedded&amp;wtEvtSrc=' + window.location.href + '&amp;vp_sli=Embedded'"&gt;
&lt;img src="http://img.microsoft.com/showcase/Content/img/resx/en-US/installSL.gif" alt="Get Microsoft Silverlight" style="border-style: none" /&gt;
&lt;/a&gt;
&lt;noscript&gt;&lt;div&gt;&lt;img alt="DCSIMG" id="DCSIMG" width="1" height="1" src="http://m.webtrends.com/dcsygm2gb10000kf9xm7kfvub_9p1t/njs.gif?dcsuri=/nojavascript&amp;amp;WT.js=No" /&gt;&lt;/div&gt;&lt;/noscript&gt;
&lt;/object&gt;&lt;script type="text/javascript"&gt;    document.write("&lt;script type='text/javascript' src='" + (window.location.protocol) + "//c.microsoft.com/ms.js'" + "'&gt;&lt;\/script&gt;");&lt;/\&gt;&lt;/script&gt;&lt;/script&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;a title="http://www.microsoft.com/showcase/en/us/details/eeb37636-e39c-47dc-a58c-c6deeb75fce3" href="http://www.microsoft.com/showcase/en/us/details/eeb37636-e39c-47dc-a58c-c6deeb75fce3"&gt;http://www.microsoft.com/showcase/en/us/details/eeb37636-e39c-47dc-a58c-c6deeb75fce3&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3423665" width="1" height="1"&gt;</content><author><name>Gary Siepser</name><uri>http://blogs.technet.com/gary.siepser/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>2011 Scripting Games</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/gary/archive/2011/03/31/2011-scripting-games.aspx" /><id>http://blogs.technet.com/b/gary/archive/2011/03/31/2011-scripting-games.aspx</id><published>2011-04-01T02:11:38Z</published><updated>2011-04-01T02:11:38Z</updated><content type="html">&lt;a href="http://bit.ly/2011sgall"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 5px 5px 5px 0px; padding-left: 0px; padding-right: 0px; border-top: 0px; border-right: 0px; padding-top: 0px" title="2011 Scripting Games badge" border="0" alt="2011 Scripting Games badge" src="http://blogs.technet.com/resized-image.ashx/__size/550x0/__key/CommunityServer-Blogs-Components-WeblogFiles/00-00-00-76-18/8561.hsg_2D00_2_2D00_11_2D00_1_2D00_1.png" width="156" height="194" /&gt;&lt;/a&gt;   &lt;p&gt;Coming up next week is the 2011 Scripting Games.&amp;#160; The last two years I have participated as a guest commentator.&amp;#160; This year Scripting Guy Ed Wilson asked me to participate as a judge.&amp;#160; So start sending bribes this way now…just kidding of course, I am un-corruptible.&lt;/p&gt;  &lt;p&gt;Good luck with the games.&amp;#160; If you are not familiar with them, they are a great way to have a task for PowerShell if you don’t have any real-world ones at the moment.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3417834" width="1" height="1"&gt;</content><author><name>Gary Siepser</name><uri>http://blogs.technet.com/gary.siepser/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>Premier Technology Day – Messaging – Coming to Alpharetta, GA Microsoft Office May 24,2010</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/gary/archive/2010/05/05/premier-technology-day-messaging-coming-to-alpharetta-ga-microsoft-office-may-24-2010.aspx" /><id>http://blogs.technet.com/b/gary/archive/2010/05/05/premier-technology-day-messaging-coming-to-alpharetta-ga-microsoft-office-may-24-2010.aspx</id><published>2010-05-05T16:52:54Z</published><updated>2010-05-05T16:52:54Z</updated><content type="html">Alright, so I am being a little bit of a sales guy here, but yours truly is presenting the transport session May 24th here in Alpharetta, GA.&amp;#160; This is a great event.&amp;#160; Think of it sort of like a nice little one-day Tech-Ed with one tract.&amp;#160; I was a part of the Platform Tech day last year at it was a very cool and well attended event.&amp;#160; Below is the data sheet for the event.&amp;#160; If you are interested in attending, contact your TAM (Technical Account Manager) for details and sign...(&lt;a href="http://blogs.technet.com/b/gary/archive/2010/05/05/premier-technology-day-messaging-coming-to-alpharetta-ga-microsoft-office-may-24-2010.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3330509" width="1" height="1"&gt;</content><author><name>Gary Siepser</name><uri>http://blogs.technet.com/gary.siepser/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>2010 Scripting Games Coming Soon</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/gary/archive/2010/03/26/2010-scripting-games-coming-soon.aspx" /><id>http://blogs.technet.com/b/gary/archive/2010/03/26/2010-scripting-games-coming-soon.aspx</id><published>2010-03-25T23:08:05Z</published><updated>2010-03-25T23:08:05Z</updated><content type="html">Those of you that read my blog, mostly do so as you are trying to become better PowerShell’ers.&amp;#160; This is an incredible opportunity to have actual tasks that will exercise your scripting muscles.&amp;#160; its a great event, and yours truly might be assisting as a guest commentator this year.&amp;#160; Check out the link below. Grab this badge here!...(&lt;a href="http://blogs.technet.com/b/gary/archive/2010/03/26/2010-scripting-games-coming-soon.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3321324" width="1" height="1"&gt;</content><author><name>Gary Siepser</name><uri>http://blogs.technet.com/gary.siepser/ProfileUrlRedirect.ashx</uri></author></entry><entry><title>The Get-MailboxStatistics Cmdlet, the TotalitemSize Property, and that pesky little “b”</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/gary/archive/2010/02/20/the-get-mailboxstatistics-cmdlet-the-totalitemsize-property-and-that-pesky-little-b.aspx" /><id>http://blogs.technet.com/b/gary/archive/2010/02/20/the-get-mailboxstatistics-cmdlet-the-totalitemsize-property-and-that-pesky-little-b.aspx</id><published>2010-02-20T05:26:00Z</published><updated>2010-02-20T05:26:00Z</updated><content type="html">In my experiences with Exchange and Powershell, I have definitely come across some interesting things. One of strangest&amp;hellip;or so I thought&amp;hellip;was the fact that whenever I looked at mailbox size it had a funny little &amp;ldquo;b&amp;rdquo; at the end and seemed to be in bytes. That little &amp;ldquo;b&amp;rdquo; though made converting that number to say MB or GB a little tricky. To see a mailbox size in Exchange 2007 or 2010, you mainly might want to use the &amp;ldquo;totalitemsize&amp;rdquo; property that is output...(&lt;a href="http://blogs.technet.com/b/gary/archive/2010/02/20/the-get-mailboxstatistics-cmdlet-the-totalitemsize-property-and-that-pesky-little-b.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3314193" width="1" height="1"&gt;</content><author><name>Gary Siepser</name><uri>http://blogs.technet.com/gary.siepser/ProfileUrlRedirect.ashx</uri></author><category term="Powershell" scheme="http://blogs.technet.com/b/gary/archive/tags/Powershell/" /><category term="Exchange" scheme="http://blogs.technet.com/b/gary/archive/tags/Exchange/" /><category term="Get-MailboxStatistics" scheme="http://blogs.technet.com/b/gary/archive/tags/Get_2D00_MailboxStatistics/" /><category term="TotalItemSize" scheme="http://blogs.technet.com/b/gary/archive/tags/TotalItemSize/" /></entry><entry><title>Quick Script to Edit a Single Attribute in AD on a Single User Account</title><link rel="alternate" type="text/html" href="http://blogs.technet.com/b/gary/archive/2010/02/02/quick-script-to-edit-a-attribute-in-ad-on-a-single-user-account.aspx" /><id>http://blogs.technet.com/b/gary/archive/2010/02/02/quick-script-to-edit-a-attribute-in-ad-on-a-single-user-account.aspx</id><published>2010-02-02T22:49:31Z</published><updated>2010-02-02T22:49:31Z</updated><content type="html">There are no real dependencies for this script, PSv1 or v2, no snap-ins, no modules….just plain old PS (POPS :) ).&amp;#160; No magic happening here, just some basic read-host and ADSI in play.&amp;#160; I wrote it for a colleague and thought I would share. #This will probably only work for strings and simple numbers and such. 
 
 $username = read-host &amp;quot;Enter a Username&amp;quot; 
 
 
 $searcher = New-Object system.directoryservices.directorysearcher 
 $searcher . filter = &amp;quot;(samaccountname=$username...(&lt;a href="http://blogs.technet.com/b/gary/archive/2010/02/02/quick-script-to-edit-a-attribute-in-ad-on-a-single-user-account.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3310208" width="1" height="1"&gt;</content><author><name>Gary Siepser</name><uri>http://blogs.technet.com/gary.siepser/ProfileUrlRedirect.ashx</uri></author><category term="Powershell" scheme="http://blogs.technet.com/b/gary/archive/tags/Powershell/" /><category term="Add-Member" scheme="http://blogs.technet.com/b/gary/archive/tags/Add_2D00_Member/" /><category term="directorysearcher" scheme="http://blogs.technet.com/b/gary/archive/tags/directorysearcher/" /><category term="Edit Attribute" scheme="http://blogs.technet.com/b/gary/archive/tags/Edit+Attribute/" /><category term="Adsi" scheme="http://blogs.technet.com/b/gary/archive/tags/Adsi/" /></entry></feed>