Categories: Office 365

Useful Scripts

&NewLine;<&excl;-- WP QUADS Content Ad Plugin v&period; 2&period;0&period;92 -->&NewLine;<div class&equals;"quads-location quads-ad2527 " id&equals;"quads-ad2527" style&equals;"float&colon;none&semi;margin&colon;0px 3px 3px 3px&semi;padding&colon;0px 0px 0px 0px&semi;" data-lazydelay&equals;"0">&NewLine;&NewLine;<&sol;div>&NewLine;&NewLine;<p>To create a script that would auto-login you to Office 365 or SSO or Windows Azure Active Directory&comma; Copy the following Script in notepad and save it as auto-login&period;ps1<&sol;p>&NewLine;<&excl;-- WP QUADS Content Ad Plugin v&period; 2&period;0&period;92 -->&NewLine;<div class&equals;"quads-location quads-ad2529 " id&equals;"quads-ad2529" style&equals;"float&colon;none&semi;margin&colon;0px 3px 3px 3px&semi;padding&colon;0px 0px 0px 0px&semi;" data-lazydelay&equals;"0">&NewLine;&NewLine;<&sol;div>&NewLine;&NewLine;<&excl;-- WP QUADS Content Ad Plugin v&period; 2&period;0&period;92 -->&NewLine;<div class&equals;"quads-location quads-ad2522 " id&equals;"quads-ad2522" style&equals;"float&colon;none&semi;margin&colon;0px 3px 3px 3px&semi;padding&colon;0px 0px 0px 0px&semi;" data-lazydelay&equals;"0">&NewLine;&NewLine;<&sol;div>&NewLine;&NewLine;<&excl;-- WP QUADS Content Ad Plugin v&period; 2&period;0&period;92 -->&NewLine;<div class&equals;"quads-location quads-ad2523 " id&equals;"quads-ad2523" style&equals;"float&colon;none&semi;margin&colon;0px 3px 3px 3px&semi;padding&colon;0px 0px 0px 0px&semi;" data-lazydelay&equals;"0">&NewLine;&NewLine;<&sol;div>&NewLine;&NewLine;&NewLine;&NewLine;&NewLine;<p>Once the file is saved with the ps1 extension you can run Powershell as administrator&comma; Drag and drop this file into Powershell and it&&num;8217&semi;ll login you automatically&period;<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p>TEXT BOX<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p>&dollar;powerUser &equals; &&num;8220&semi;admin&commat;domain&period;onmicrosoft&period;com&&num;8221&semi;<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p>&dollar;powerPass &equals; &&num;8220&semi;password&&num;8221&semi;<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p>&dollar;password &equals; ConvertTo-SecureString &dollar;powerPass -AsPlainText -Force<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p>&dollar;LiveCred &equals; New-Object -TypeName System&period;Management&period;Automation&period;PSCredential -argumentlist &dollar;powerUser&comma;&dollar;password<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p>&dollar;s&equals;new-pssession -configurationname microsoft&period;exchange -connectionuri <a href&equals;"https&colon;&sol;&sol;www&period;google&period;com&sol;url&quest;q&equals;https&percnt;3A&percnt;2F&percnt;2Fps&period;outlook&period;com&percnt;2Fpowershell&amp&semi;sa&equals;D&amp&semi;sntz&equals;1&amp&semi;usg&equals;AFQjCNG6kFRYvmIcjlQdnFK1Kf4g8-0vgg" target&equals;"&lowbar;blank" rel&equals;"noreferrer noopener">https&colon;&sol;&sol;ps&period;outlook&period;com&sol;powershell<&sol;a> -credential &dollar;livecred -authentication basic -allowredirection<&sol;p>&NewLine;<&excl;-- WP QUADS Content Ad Plugin v&period; 2&period;0&period;92 -->&NewLine;<div class&equals;"quads-location quads-ad2531 " id&equals;"quads-ad2531" style&equals;"float&colon;none&semi;margin&colon;0px 3px 3px 3px&semi;padding&colon;0px 0px 0px 0px&semi;" data-lazydelay&equals;"0">&NewLine;&NewLine;<&sol;div>&NewLine;&NewLine;&NewLine;&NewLine;&NewLine;<p>&dollar;import &equals; import-pssession &dollar;s<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p>Import-Module MSOnline<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p>connect-msolservice -credential &dollar;livecred<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p><strong>Exporting Mailflow transport rules from Office 365 &lpar;Exchange Online&rpar;<&sol;strong><&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<p>Exporting Rules<&sol;p>&NewLine;<&excl;-- WP QUADS Content Ad Plugin v&period; 2&period;0&period;92 -->&NewLine;<div class&equals;"quads-location quads-ad2526 " id&equals;"quads-ad2526" style&equals;"float&colon;none&semi;margin&colon;0px 3px 3px 3px&semi;padding&colon;0px 0px 0px 0px&semi;" data-lazydelay&equals;"0">&NewLine;&NewLine;<&sol;div>&NewLine;&NewLine;&NewLine;&NewLine;&NewLine;<figure class&equals;"wp-block-image"><img src&equals;"https&colon;&sol;&sol;lh3&period;googleusercontent&period;com&sol;z&lowbar;eG4v7a06lOKMzsSgmVpr8x1dm2HLtmD8tU8oKrhkmAEN6iZHpdYzIqWsGEQ72JYu9AZdxg&lowbar;g&equals;w572" alt&equals;""&sol;> &NewLine;&NewLine;<&excl;-- WP QUADS Content Ad Plugin v&period; 2&period;0&period;92 -->&NewLine;<div class&equals;"quads-location quads-ad2528 " id&equals;"quads-ad2528" style&equals;"float&colon;none&semi;margin&colon;0px 3px 3px 3px&semi;padding&colon;0px 0px 0px 0px&semi;" data-lazydelay&equals;"0">&NewLine;&NewLine;<&sol;div>&NewLine; &NewLine;<&sol;figure>&NewLine;&NewLine;&NewLine;&NewLine;<figure class&equals;"wp-block-image"><img src&equals;"https&colon;&sol;&sol;lh3&period;googleusercontent&period;com&sol;gIBqoYkmmMdPYXQdVWEBDbwK&lowbar;0Qo1Q0DVkpOPlff2OIuqStg7yrQ9VkQczdwhCk4Ha8QtqWu6-V0WfL8NibPUuOF6UyvS9LEkXdVdBbHF8HGow9bQMs&equals;w1175" alt&equals;""&sol;><&sol;figure>&NewLine;&NewLine;&NewLine;&NewLine;<p>Importing rules<&sol;p>&NewLine;&NewLine;&NewLine;&NewLine;<figure class&equals;"wp-block-image"><img src&equals;"https&colon;&sol;&sol;lh3&period;googleusercontent&period;com&sol;7o24Esqq1Ff6WSE9xpIC1OF2x9XdH3l4mVJBuBV0xAPTU409vCWJU9Y-&lowbar;&lowbar;c2GaqHveWTawc&equals;w1175" alt&equals;""&sol;><&sol;figure>&NewLine;<&sol;p>&NewLine;<&excl;-- WP QUADS Content Ad Plugin v&period; 2&period;0&period;92 -->&NewLine;<div class&equals;"quads-location quads-ad2524 " id&equals;"quads-ad2524" style&equals;"float&colon;none&semi;margin&colon;0px 3px 3px 3px&semi;padding&colon;0px 0px 0px 0px&semi;" data-lazydelay&equals;"0">&NewLine;&NewLine;<&sol;div>&NewLine;&NewLine;

moh10ly

Recent Posts

Reset passwords for Active Directory Users

Reset and manage your Active Directory users' Passwords Active Directory is one of the most…

3 years ago

Finding Exchange Database hidden mailboxes. ​

Finding Exchange Database hidden mailboxes. Story:Maybe you have been in this situation before, trying to…

3 years ago

Setting up ADConnect and PTA (Password auth through) servers agents behind proxy

If you're using a Proxy server in your firewall or in your network and have…

3 years ago

Get Report of Active Directory Locked Accounts and Machine they logged in from

Story:I got some clients  that have reported some of their users being locked out and…

3 years ago

Checking and Providing Full and SendAs delegate access on O365 Exchange Online

Delegate Permissions This is a code that I have wrote recently to check if an…

3 years ago

Retrieving attachments from Exchange mailbox using python

Story: I got a request from a client who constantly gets CVs and have to…

4 years ago

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298

Warning: Undefined array key "adsense_ad_type" in /www/wwwroot/www.moh10ly.com/wp-content/plugins/quick-adsense-reloaded/includes/amp-condition-display.php on line 298