<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Thomas Ashworth</title><link>http://blogs.technet.com/b/thomas_ashworth/</link><description /><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>Office 365 Script: Append additional proxy address to existing cloud identity</title><link>http://blogs.technet.com/b/thomas_ashworth/archive/2012/06/28/office-365-script-append-additional-proxy-address-to-existing-cloud-identity.aspx</link><pubDate>Thu, 28 Jun 2012 23:31:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3506566</guid><dc:creator>Thomas Ashworth</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/thomas_ashworth/rsscomments.aspx?WeblogPostID=3506566</wfw:commentRss><comments>http://blogs.technet.com/b/thomas_ashworth/archive/2012/06/28/office-365-script-append-additional-proxy-address-to-existing-cloud-identity.aspx#comments</comments><description>&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;What more can be said other than the title? &amp;nbsp;Enjoy&amp;hellip;&amp;nbsp;&amp;nbsp;:)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Read the help information for details on how to execute the script.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Get-help .\SetMailbox_AppendAdditionalProxyAddress_FromCSV.ps1 -full&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;A copy of the script can be downloaded by clicking on the link below.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3506566" width="1" height="1"&gt;</description><enclosure url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-03-50-65-66/SetMailbox_5F00_AppendProxyAddress_5F00_FromCSV.ps1" length="18192" type="application/octet-stream" /><category domain="http://blogs.technet.com/b/thomas_ashworth/archive/tags/office+365+scripts/">office 365 scripts</category><category domain="http://blogs.technet.com/b/thomas_ashworth/archive/tags/office+365/">office 365</category></item><item><title>Office 365 Script: Create cloud identities by referencing a CSV file</title><link>http://blogs.technet.com/b/thomas_ashworth/archive/2012/06/28/office-365-script-create-cloud-identities-by-referencing-a-csv-file.aspx</link><pubDate>Thu, 28 Jun 2012 21:48:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3506549</guid><dc:creator>Thomas Ashworth</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/thomas_ashworth/rsscomments.aspx?WeblogPostID=3506549</wfw:commentRss><comments>http://blogs.technet.com/b/thomas_ashworth/archive/2012/06/28/office-365-script-create-cloud-identities-by-referencing-a-csv-file.aspx#comments</comments><description>&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;It&amp;rsquo;s easy to think in terms of enterprise deployments and come up with solutions to fit those scenarios.&amp;nbsp; Then, low and behold, a day comes along when you have a need to provision users without using DirSync!&amp;nbsp; It&amp;rsquo;s doubtful that most of us would want to create users manually.&amp;nbsp; So, if you fall into this scenario and have a need to scriptomatically create users, then feel free to use this script as a way to provision your one&amp;rsquo;s, ten&amp;rsquo;s, hundred&amp;rsquo;s, or whatever number of users as cloud identities (not federated identities).&amp;nbsp; Once the identities are provisioned, you will still need to assign licenses to them and distribute passwords.&amp;nbsp; Fortunately, this script will save the automatically generated passwords to a file for easy reference later when you are ready to distribute them to your user population.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Read the help information for details on how to execute the script.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Get-help .\&lt;span style="font-size: small;" size="3"&gt; NewMsolUser_FromCSV.ps1 -full&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;A copy of the script can be downloaded by clicking on the link below.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3506549" width="1" height="1"&gt;</description><enclosure url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-03-50-65-49/NewMsolUser_5F00_FromCSV.ps1" length="17314" type="application/octet-stream" /><category domain="http://blogs.technet.com/b/thomas_ashworth/archive/tags/office+365+scripts/">office 365 scripts</category><category domain="http://blogs.technet.com/b/thomas_ashworth/archive/tags/office+365/">office 365</category></item><item><title>Office 365 Script: Count total user, group, and contact objects in on-premises Active Directory forest in preparation for deploying DirSync</title><link>http://blogs.technet.com/b/thomas_ashworth/archive/2012/04/13/office-365-script-count-total-user-group-and-contact-objects-in-on-premises-active-directory-forest-in-preparation-for-deploying-dirsync.aspx</link><pubDate>Fri, 13 Apr 2012 15:21:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3492042</guid><dc:creator>Thomas Ashworth</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/thomas_ashworth/rsscomments.aspx?WeblogPostID=3492042</wfw:commentRss><comments>http://blogs.technet.com/b/thomas_ashworth/archive/2012/04/13/office-365-script-count-total-user-group-and-contact-objects-in-on-premises-active-directory-forest-in-preparation-for-deploying-dirsync.aspx#comments</comments><description>&lt;p&gt;So, you are preparing to deploy the Directory Synchronization tool for Office 365 and are looking for a PowerShell script that will count all of the users, groups, and contacts in the on-premises Active Directory.&amp;nbsp; First, I should point out that the &lt;a href="http://community.office365.com/en-us/f/183/p/2285/8155.aspx"&gt;Deployment Readiness Tool&lt;/a&gt; that is available for download from the Office 365 community site will count the objects plus perform additional useful checks.&amp;nbsp; If, however, you still want a PowerShell script that is dedicated to only counting objects, then look no further.&amp;nbsp; This script does not require additional software to run (other than PowerShell).&amp;nbsp; It does, however, require read-only access to the on-premises Active Directory.&amp;nbsp; The results of the script will be displayed to the PowerShell console as well as saved to a CSV file.&amp;nbsp; Enjoy&amp;hellip;&lt;/p&gt;
&lt;p&gt;A copy of the script can be downloaded by clicking the link below.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3492042" width="1" height="1"&gt;</description><enclosure url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-03-49-20-42/GetTotalUsersGroupsContactsInForest.ps1" length="22906" type="application/octet-stream" /><category domain="http://blogs.technet.com/b/thomas_ashworth/archive/tags/office+365+scripts/">office 365 scripts</category><category domain="http://blogs.technet.com/b/thomas_ashworth/archive/tags/directory+synchronization/">directory synchronization</category><category domain="http://blogs.technet.com/b/thomas_ashworth/archive/tags/directory+synchronization+tool/">directory synchronization tool</category><category domain="http://blogs.technet.com/b/thomas_ashworth/archive/tags/office+365/">office 365</category><category domain="http://blogs.technet.com/b/thomas_ashworth/archive/tags/dirsync+quota/">dirsync quota</category><category domain="http://blogs.technet.com/b/thomas_ashworth/archive/tags/dirsync/">dirsync</category></item><item><title>Office 365 Script: Get Office 365 tenant SKU/license usage information</title><link>http://blogs.technet.com/b/thomas_ashworth/archive/2012/04/11/script-to-get-office-365-tenant-sku-license-usage-information.aspx</link><pubDate>Wed, 11 Apr 2012 22:53:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3491653</guid><dc:creator>Thomas Ashworth</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/thomas_ashworth/rsscomments.aspx?WeblogPostID=3491653</wfw:commentRss><comments>http://blogs.technet.com/b/thomas_ashworth/archive/2012/04/11/script-to-get-office-365-tenant-sku-license-usage-information.aspx#comments</comments><description>&lt;p&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;span style="font-size: small;" size="3"&gt;So, you already know how to get license usage information from the Microsoft Online Portal, but now you are looking for a way to accomplish the same thing via PowerShell.&amp;nbsp; Perhaps you are working on a little bit of automation to create a CSV report of usage information that you can send to yourself or team.&amp;nbsp; The following script should be helpful as it will get the license usage information and dump it to a CSV file along with displaying the same results to the PowerShell console.&amp;nbsp; &lt;/span&gt;In order for the script to work, you will need to download and install the Microsoft Online Services Module for Windows PowerShell.&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Read the help information for details on how to execute the script.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Get-help .\GetMsolTenantSkuUsage.ps1 -full&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;A copy of the script can be downloaded by clicking on the link below.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3491653" width="1" height="1"&gt;</description><enclosure url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-03-49-16-53/GetMsolTenantSkuUsage.ps1" length="16986" type="application/octet-stream" /><category domain="http://blogs.technet.com/b/thomas_ashworth/archive/tags/office+365+scripts/">office 365 scripts</category><category domain="http://blogs.technet.com/b/thomas_ashworth/archive/tags/office+365/">office 365</category><category domain="http://blogs.technet.com/b/thomas_ashworth/archive/tags/office+365+sku/">office 365 sku</category><category domain="http://blogs.technet.com/b/thomas_ashworth/archive/tags/office+365+license/">office 365 license</category></item><item><title>Office 365 Script: Get an Office 365 user statistics report</title><link>http://blogs.technet.com/b/thomas_ashworth/archive/2012/04/11/get-an-office-365-user-statistics-report.aspx</link><pubDate>Wed, 11 Apr 2012 22:39:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3491649</guid><dc:creator>Thomas Ashworth</dc:creator><slash:comments>9</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/thomas_ashworth/rsscomments.aspx?WeblogPostID=3491649</wfw:commentRss><comments>http://blogs.technet.com/b/thomas_ashworth/archive/2012/04/11/get-an-office-365-user-statistics-report.aspx#comments</comments><description>&lt;p&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;span style="font-size: small;" size="3"&gt;Need a way to report mailbox statistics and/or mobile device usage information (plus a few other things) to your various business groups or subsidiaries?&amp;nbsp; Or, perhaps you want to verify that users have been assigned the correct license?&amp;nbsp; Use the following script to generate a little report &amp;ndash; or big report if you have several thousands of users.&lt;/span&gt; In order for the script to work, you will need to download and install the Microsoft Online Services Module for Windows PowerShell.&amp;nbsp; Keep in mind that the script can take a while to run across the internet against Office 365 if you have several thousands of users.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Read the help information for details on how to execute the script.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Get-help .\GetMsolUserReport.ps1 -full&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;A copy of the script can be downloaded by clicking on the link below.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;UPDATED 09/07/2012&amp;nbsp;&lt;/p&gt;
&lt;p&gt;- fixed a couple of typo's resulting from&amp;nbsp;the previous update&lt;/p&gt;
&lt;p&gt;UPDATED 08/17/2012&lt;/p&gt;
&lt;p&gt;- fixed an issue where the script would throw an error about variable optimization when run using PowerShell v3 pre-release.&lt;/p&gt;
&lt;p&gt;UPDATED 05/07/2012&lt;/p&gt;
&lt;p&gt;- fixed an issue where department, company, and manager attribute values were not being saved to the file.&amp;nbsp; Thanks for pointing this out!&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3491649" width="1" height="1"&gt;</description><enclosure url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-03-49-16-49/GetMsolUserReport.ps1" length="51026" type="application/octet-stream" /><category domain="http://blogs.technet.com/b/thomas_ashworth/archive/tags/office+365+scripts/">office 365 scripts</category><category domain="http://blogs.technet.com/b/thomas_ashworth/archive/tags/office+365/">office 365</category><category domain="http://blogs.technet.com/b/thomas_ashworth/archive/tags/office+365+report/">office 365 report</category><category domain="http://blogs.technet.com/b/thomas_ashworth/archive/tags/office+365+user+report/">office 365 user report</category></item><item><title>Office 365 Script: Assign Office 365 licenses</title><link>http://blogs.technet.com/b/thomas_ashworth/archive/2012/04/11/script-to-assign-office-365-licenses.aspx</link><pubDate>Wed, 11 Apr 2012 22:03:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3491643</guid><dc:creator>Thomas Ashworth</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/thomas_ashworth/rsscomments.aspx?WeblogPostID=3491643</wfw:commentRss><comments>http://blogs.technet.com/b/thomas_ashworth/archive/2012/04/11/script-to-assign-office-365-licenses.aspx#comments</comments><description>&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;So, you have some users that are now using Office 365, and you need to assign licenses to those users.&amp;nbsp; The following script will enable you to license the users by referencing a CSV file, by identifying all unlicensed users, or by identifying only those users that need license reconciliation.&amp;nbsp; If you have migrated some users, but not all, then you may want to use the option to license only those that require license reconciliation so that you do not assign a license to everyone.&amp;nbsp; If, however, you want to license everyone at once (that does not already have a license), then you may want to use the option to license all unlicensed users.&amp;nbsp; In order for the script to work, you will need to download and install the Microsoft Online Services Module for Windows PowerShell.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Read the help information for details on how to execute the script.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Get-help .\&lt;span style="font-size: small;" size="3"&gt;SetMsolUserLicense_AddLicense.ps1 -full&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;A copy of the script can be downloaded by clicking on the link below.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri; font-size: small;" size="3" face="Calibri"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3491643" width="1" height="1"&gt;</description><enclosure url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-03-49-16-43/SetMsolUserLicense_5F00_AddLicense.ps1" length="19773" type="application/octet-stream" /><category domain="http://blogs.technet.com/b/thomas_ashworth/archive/tags/office+365+scripts/">office 365 scripts</category><category domain="http://blogs.technet.com/b/thomas_ashworth/archive/tags/office+365/">office 365</category><category domain="http://blogs.technet.com/b/thomas_ashworth/archive/tags/office+365+license/">office 365 license</category></item><item><title>Office 365 Script: Get Office 365 Account Sku ID’s and Service Plan Names</title><link>http://blogs.technet.com/b/thomas_ashworth/archive/2012/04/11/get-office-365-account-sku-id-s-and-service-plan-names.aspx</link><pubDate>Wed, 11 Apr 2012 21:46:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3491641</guid><dc:creator>Thomas Ashworth</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/thomas_ashworth/rsscomments.aspx?WeblogPostID=3491641</wfw:commentRss><comments>http://blogs.technet.com/b/thomas_ashworth/archive/2012/04/11/get-office-365-account-sku-id-s-and-service-plan-names.aspx#comments</comments><description>&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Preparing to assign Office 365 licenses to users, but want to disable certain plans associated with the license sku id?&amp;nbsp; Well, before you can do that, you need to know the names of the service plans.&amp;nbsp; Use the following script to get the account sku id&amp;rsquo;s for a tenant and the corresponding service plan names.&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Read the help information for details on how to execute the script.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Get-help .\GetAccountSkuIdsAndServicePlanNames.ps1 -full&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri; font-size: small;" size="3" face="Calibri"&gt;&amp;nbsp;A copy of the script can be downloaded by clicking on the link below.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri; font-size: small;" size="3" face="Calibri"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3491641" width="1" height="1"&gt;</description><enclosure url="http://blogs.technet.com/cfs-file.ashx/__key/communityserver-components-postattachments/00-03-49-16-41/GetMsolAccountSkuIdsAndServicePlanNames.ps1" length="17604" type="application/octet-stream" /><category domain="http://blogs.technet.com/b/thomas_ashworth/archive/tags/office+365+scripts/">office 365 scripts</category><category domain="http://blogs.technet.com/b/thomas_ashworth/archive/tags/office+365/">office 365</category><category domain="http://blogs.technet.com/b/thomas_ashworth/archive/tags/office+365+sku/">office 365 sku</category><category domain="http://blogs.technet.com/b/thomas_ashworth/archive/tags/office+365+license/">office 365 license</category></item><item><title>Connect to Office 365 via Remote PowerShell</title><link>http://blogs.technet.com/b/thomas_ashworth/archive/2012/04/11/connect-to-office-365-via-remote-powershell.aspx</link><pubDate>Wed, 11 Apr 2012 21:28:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:3491639</guid><dc:creator>Thomas Ashworth</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blogs.technet.com/b/thomas_ashworth/rsscomments.aspx?WeblogPostID=3491639</wfw:commentRss><comments>http://blogs.technet.com/b/thomas_ashworth/archive/2012/04/11/connect-to-office-365-via-remote-powershell.aspx#comments</comments><description>&lt;p&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;First, I should point out that there are a couple of ways of connecting to Office 365. One option involves using the Microsoft Online Service Module for Windows PowerShell cmdlet named Connect-MsolService. This option will connect you to the Office 365 PowerShell web service so that you can execute any of the cmdlets that are included in the MSOnline module. &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Another option involves establishing a remote PowerShell connection to Exchange Online for the purpose of remotely executing native Exchange cmdlets against Office 365. This is the option that I describe as follows.&amp;nbsp; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Try creating a function and adding it to your PowerShell profile so that you can quickly execute the function from any open PowerShell session when you need it. &amp;nbsp;&lt;span style="font-size: small;" size="3"&gt;Start by creating a PowerShell profile if you do not already have one.&amp;nbsp; The following one liner will create an empty PowerShell profile.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;PS&amp;gt; New-item $profile &amp;ndash;itemtype file &amp;ndash;force&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri; font-size: small;" size="3" face="Calibri"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Next open the profile file in Notepad.&amp;nbsp; This step is easily performed from PowerShell using the following command.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;PS&amp;gt; notepad $profile&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri; font-size: small;" size="3" face="Calibri"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Copy and paste the following function into the profile, save the file, and restart PowerShell (or reload the profile).&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: Calibri; font-size: small;" size="3" face="Calibri"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;table border="1" cellspacing="0" cellpadding="0"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td valign="top" width="638"&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Function Connect-ExchangeOnline&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;{&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [CmdletBinding()]&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; param&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Parameter(Mandatory = $False)]&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [System.Management.Automation.PsCredential]$Credential = $Host.UI.PromptForCredential("Enter MSOL Admin Credential",&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Enter the username and password of an MSOnline Administrator account.",&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "",&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "userCreds"),&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Parameter(Mandatory = $False)]&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [System.Uri]$Uri = "https://ps.outlook.com/powershell/"&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri $Uri -Credential $Credential -Authentication "Basic" -AllowRedirection&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Import-PSSession $session -AllowClobber&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Return $session&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;span style="font-family: Calibri; font-size: small;" size="3" face="Calibri"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: small;" size="3"&gt;&lt;span style="font-family: Calibri;" face="Calibri"&gt;Now, when you need to connect to Office 365 to run Exchange cmdlets, you can simply type &amp;ldquo;Connect-ExchangeOnline&amp;rdquo; directly at the PowerShell prompt just as if you were launching a cmdlet.&amp;nbsp; It is no longer necessary to try to remember where you stored that script or text file that contains the lines of code used to establish the connection - the code/function is readily available upon demand at your fingertips every time you launch PowerShell.&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=3491639" width="1" height="1"&gt;</description></item></channel></rss>