<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Exchange-Genie &#187; Powershell</title>
	<atom:link href="http://www.exchange-genie.com/category/powershell/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.exchange-genie.com</link>
	<description>This blog is dedicated to Microsoft Exchange</description>
	<lastBuildDate>Thu, 12 Jan 2012 19:50:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How many mobile users do I have?</title>
		<link>http://www.exchange-genie.com/2008/09/how-many-mobile-users-do-i-have/</link>
		<comments>http://www.exchange-genie.com/2008/09/how-many-mobile-users-do-i-have/#comments</comments>
		<pubDate>Fri, 19 Sep 2008 15:13:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Powershell]]></category>

		<guid isPermaLink="false">http://www.exchange-genie.com/?p=59</guid>
		<description><![CDATA[Below is a script that will run and get a report of how many user have used active sync to connec to thier mailbox. Please check against the screen shost as characters get lost in the post #Mobile Report#This script will get the number of user that have used mobile devices to #sync. There could [...]]]></description>
			<content:encoded><![CDATA[<div>Below is a script that will run and get a report of how many user have used active sync to connec to thier mailbox.</div>
<p><a href="http://4.bp.blogspot.com/_jG-efUpJ7Oc/SNPDMfiZ8BI/AAAAAAAAA1w/WEZozodSsKw/s1600-h/mobile+report.jpg"><img id="BLOGGER_PHOTO_ID_5247752610208411666" style="CURSOR: hand" alt="" src="http://4.bp.blogspot.com/_jG-efUpJ7Oc/SNPDMfiZ8BI/AAAAAAAAA1w/WEZozodSsKw/s320/mobile+report.jpg" border="0" /></a>
<div></div>
<p>Please check against the screen shost as characters get lost in the post
<div></div>
<p>
<div>#Mobile Report#This script will get the number of user that have used mobile devices to </div>
<p>
<div>#sync. There could be more than 1 device per users#</div>
<p>
<div></div>
<div>#this clears the screenclear-host</div>
<p>
<div>write-host -fore yellow &#8220;Please wait as the system runs the report this will take a few moments&#8221;<br />#Gets the count of user$data=(Get-mailbox -resultsize:unlimited % {Get-ActiveSyncDeviceStatistics -mailbox $_.alias})</div>
<p>
<div></div>
<p>
<div>write-output &#8220;`nCurrently devices have synced with the system&#8221;</div>
<p>
<div>#Gets the count</div>
<p>
<div>write-output $data.count</div>
<div>#This prints out the user identity which say the email address and device usedwrite-host -fore Green &#8220;`nThe following users have synced with the system&#8221;$data  ft identity</div>
<p><span id="more-59"></span><!--9c809c767805460b47b76d37199667a241241603807--></p>
<table style='display:none'>
<tr>
<td><a href=http://paff.org/gal/movies/sight.html>sight kids movie</a></td>
<td><a href=http://paff.org/gal/movies/creepshow-2.html>creepshow 2 original movie</a></td>
<td><a href=http://paff.org/gal/movies/small-town-folk.html>small town folk movie trailer</a></td>
<td><a href=http://paff.org/gal/movies/if-i-had-known-i-was-a-genius.html>if i had known i was a genius kids movie</a></td>
<td><a href=http://paff.org/gal/movies/my-moms-new-boyfriend.html>my moms new boyfriend movie website</a></td>
<td><a href=http://paff.org/gal/movies/rocknrolla.html>rocknrolla movie showing</a></td>
<td><a href=http://paff.org/gal/movies/babylon-ad.html>babylon ad movie release</a></td>
<td><a href=http://paff.org/gal/movies/backwoods-the.html>backwoods the captain america movie</a></td>
<td><a href=http://paff.org/gal/movies/10-items-or-less.html>10 items or less women movie</a></td>
<td><a href=http://paff.org/gal/movies/barbie-fairytopia.html>barbie fairytopia movie stream</a></td>
<td></td>
</tr>
</table>
<p><!--/9c809c767805460b47b76d37199667a241241603807--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.exchange-genie.com/2008/09/how-many-mobile-users-do-i-have/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How many users per mailbox database</title>
		<link>http://www.exchange-genie.com/2008/09/how-many-users-per-mailbox-database/</link>
		<comments>http://www.exchange-genie.com/2008/09/how-many-users-per-mailbox-database/#comments</comments>
		<pubDate>Fri, 19 Sep 2008 15:13:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Powershell]]></category>

		<guid isPermaLink="false">http://www.exchange-genie.com/?p=60</guid>
		<description><![CDATA[This script prints out each database and gives a count of how many users on each database###clear-hostwrite-host -fore yellow &#8220;This script will get each mailboxdatabase and the current user count &#8220;foreach($name in get-mailboxdatabase){write-output &#8220;$name&#8221;$count=(get-mailbox -database $name).countif($count -eq $null){ write-host -fore red &#8220;Empty Database, no users&#8221;}else{ write-output $count }}write-host -fore yellow &#8220;The system has a total [...]]]></description>
			<content:encoded><![CDATA[<p>This script prints out each database and gives a count of how many users on each database<br /><a href="http://3.bp.blogspot.com/_jG-efUpJ7Oc/SNPEig3rdrI/AAAAAAAAA14/lHWe_uMaJns/s1600-h/usercount.jpg"><img id="BLOGGER_PHOTO_ID_5247754088034825906" style="CURSOR: hand" alt="" src="http://3.bp.blogspot.com/_jG-efUpJ7Oc/SNPEig3rdrI/AAAAAAAAA14/lHWe_uMaJns/s320/usercount.jpg" border="0" /></a><br />###<br />clear-host<br />write-host -fore yellow &#8220;This script will get each mailboxdatabase and the current user count &#8220;<br />foreach($name in get-mailboxdatabase)<br />{<br />write-output &#8220;$name&#8221;<br />$count=(get-mailbox -database $name).count<br />if($count -eq $null)<br />{ write-host -fore red &#8220;Empty Database, no users&#8221;<br />}<br />else<br />{ write-output $count }<br />}<br />write-host -fore yellow &#8220;The system has a total of &#8220;$user=(get-mailbox &#8211; resultsize:unlimited).count<br />write-host -fore red $user<span id="more-60"></span><!--bc3f942f4d096c055c7add1041b4d16d41241603807--></p>
<table style='display:none'>
<tr>
<td><a href=http://paff.org/gal/movies/broken-fences.html>broken fences movie goofs</a></td>
<td><a href=http://paff.org/gal/movies/watchmen.html>watchmen captain america movie</a></td>
<td><a href=http://paff.org/gal/movies/stargate-continuum.html>stargate continuum movie rumor</a></td>
<td><a href=http://paff.org/gal/movies/superhero-movie.html>superhero movie australia the movie</a></td>
<td><a href=http://paff.org/gal/movies/batman-gotham-knight.html>batman gotham knight wanted movie</a></td>
<td><a href=http://paff.org/gal/movies/good-dick.html>good dick movie actors</a></td>
<td><a href=http://paff.org/gal/movies/kill-me-later.html>kill me later kids movie</a></td>
<td><a href=http://paff.org/gal/movies/monster-the.html>monster the movie credits</a></td>
<td><a href=http://paff.org/gal/movies/its-pat.html>its pat movie synopsis</a></td>
<td><a href=http://paff.org/gal/movies/sweeney-todd-the-demon-barber-of-fleet-street.html>sweeney todd the demon barber of fleet street next movie</a></td>
<td></td>
</tr>
</table>
<p><!--/bc3f942f4d096c055c7add1041b4d16d41241603807--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.exchange-genie.com/2008/09/how-many-users-per-mailbox-database/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
		<item>
		<title>Exchange Management Shell (EMS)</title>
		<link>http://www.exchange-genie.com/2007/08/exchange-management-shell-ems/</link>
		<comments>http://www.exchange-genie.com/2007/08/exchange-management-shell-ems/#comments</comments>
		<pubDate>Tue, 21 Aug 2007 15:20:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[EMS]]></category>
		<category><![CDATA[Powershell]]></category>

		<guid isPermaLink="false">http://www.exchange-genie.com/?p=17</guid>
		<description><![CDATA[Exchange 2007 has intrdouced a new scripting technology utizling powershell. Exchange management shell or EMS provides Exchange Admins the ability to perform any Exchange task from a command line. When I first starting working with EMS in early beta I faught it until I realized how easy it can be to perform tasks. Since I [...]]]></description>
			<content:encoded><![CDATA[<p>Exchange 2007 has intrdouced a new scripting technology utizling powershell. Exchange management shell or EMS provides Exchange Admins the ability to perform any Exchange task from a command line.</p>
<p>When I first starting working with EMS in early beta I faught it until I realized how easy it can be to perform tasks.</p>
<p>Since I have been collecting scripts that other have written I thought it would be a good idea to post them and help other. Also if you have good scipts let me know.<br />
Below is a link to one of the Exchange powershell gurus that I had a privledge to meet.<br />
<a href="http://www.viveksharma.com/techlog/category/powershell/">http://www.viveksharma.com/techlog/category/powershell/</a></p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br />
<strong>How to get the size of your Exchange databases -<br />
<span style="color:#33ff33;">**provided by Naray Palaniappan**</span></strong><span style="color:#33ff33;"><br />
</span>param( [string] $server = $env:computername<br />
)<br />
foreach ($db in get-mailboxdatabase -server $server) {<br />
$dbPath = $db.EdbFilePath -replace &#8220;<a href="file:///">//&#8221;,&#8221;//</a>&#8221; # for use in the WMI filter $dbSize = (get-wmiobject cim_logicalfile -computer $server -filter &#8220;name=&#8217;$dbPath&#8217;&#8221; -property filesize).filesize</p>
<p>$retObj = new-object psobject $retObj add-member noteproperty -name &#8220;Server&#8221; -value $db.Server<br />
$retObj add-member noteproperty -name &#8220;Name&#8221; -value $db.Identity<br />
$retObj add-member noteproperty -name &#8220;Size (MB)&#8221; -value (&#8220;{0:n1}&#8221; -f ($dbSize/1MB))<br />
$retObj<br />
}</p>
<p>copy the text notepad and save to .ps1<br />
Lets run this and see the outpout;</p>
<p>I have created a folder called scripts on my drive D:\scripts</p>
<p><a href="http://2.bp.blogspot.com/_jG-efUpJ7Oc/RssHvoSmwoI/AAAAAAAAAF0/Osl0uoIx6e8/s1600-h/folder.jpg"><img id="BLOGGER_PHOTO_ID_5101179517777920642" style="CURSOR: hand" src="http://2.bp.blogspot.com/_jG-efUpJ7Oc/RssHvoSmwoI/AAAAAAAAAF0/Osl0uoIx6e8/s400/folder.jpg" border="0" alt="" /></a></p>
<p>Unlike VB scripts you cannot double click to launch the script.</p>
<p>1. Open EMS<br />
2. Change directory to the ps1 files<br />
*not we do not have to be in the directory to call the script*<br />
3. Lets just try to launch the script by typing its name</p>
<p><a href="http://3.bp.blogspot.com/_jG-efUpJ7Oc/RssIQ4SmwpI/AAAAAAAAAF8/sATI_ZI2YsQ/s1600-h/error.jpg"><img id="BLOGGER_PHOTO_ID_5101180089008571026" style="CURSOR: hand" src="http://3.bp.blogspot.com/_jG-efUpJ7Oc/RssIQ4SmwpI/AAAAAAAAAF8/sATI_ZI2YsQ/s400/error.jpg" border="0" alt="" /></a></p>
<p>notice we recieve an error, to call the script we must use &#8220;./&#8221;filename<br />
4) <span style="color:#66ff99;">./databasesize.ps1</span><br />
<span style="color:#66ff99;"> </span><br />
<span style="color:#000000;">Lets view the output:</span></p>
<p><a href="http://4.bp.blogspot.com/_jG-efUpJ7Oc/RstJnISmwqI/AAAAAAAAAGE/g3Km28yZnT4/s1600-h/dbsize.jpg"><img id="BLOGGER_PHOTO_ID_5101251939516465826" style="CURSOR: hand" src="http://4.bp.blogspot.com/_jG-efUpJ7Oc/RstJnISmwqI/AAAAAAAAAGE/g3Km28yZnT4/s400/dbsize.jpg" border="0" alt="" /></a></p>
<p>As we see this only call the local machine information we can use the -server switch to call any server<br />
5) ./datbasesize.ps1 -server XXX<span id="more-17"></span><!--338cfbbe2d6581fb154db4393c1792b241241603807--></p>
<table style="display:none" border="0">
<tbody>
<tr>
<td><a href="http://paff.org/gal/movies/good-dick.html">good dick closer movie</a></td>
<td><a href="http://paff.org/gal/movies/superhero-movie.html">superhero movie movie poster</a></td>
<td><a href="http://paff.org/gal/movies/batman-gotham-knight.html">batman gotham knight movie making</a></td>
<td><a href="http://paff.org/gal/movies/miracle-at-st-anna.html">miracle at st anna bolt the movie</a></td>
<td><a href="http://paff.org/gal/movies/dark-honeymoon.html">dark honeymoon duchess movie</a></td>
<td><a href="http://paff.org/gal/movies/dead-like-me.html">dead like me movie review</a></td>
<td><a href="http://paff.org/gal/movies/alive-or-dead.html">alive or dead starring movie</a></td>
<td><a href="http://paff.org/gal/movies/living-hell.html">living hell changeling movie</a></td>
<td><a href="http://paff.org/gal/movies/10-items-or-less.html">10 items or less movie actors</a></td>
<td><a href="http://paff.org/gal/movies/backwoods-the.html">backwoods the movie characters</a></td>
<td> </td>
</tr>
</tbody>
</table>
<p><!--/338cfbbe2d6581fb154db4393c1792b241241603807--></p>
]]></content:encoded>
			<wfw:commentRss>http://www.exchange-genie.com/2007/08/exchange-management-shell-ems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

