<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Microsoft on IT Admin</title><link>/tags/microsoft/</link><description>Recent content in Microsoft on IT Admin</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sun, 27 Sep 2026 00:00:00 +0000</lastBuildDate><atom:link href="/tags/microsoft/index.xml" rel="self" type="application/rss+xml"/><item><title>PowerShell + Microsoft Graph + Fedora</title><link>/posts/post-6/</link><pubDate>Sun, 27 Sep 2026 00:00:00 +0000</pubDate><guid>/posts/post-6/</guid><description>&lt;p>A practical reference for connecting PowerShell to Exchange Online and Microsoft Graph from Linux (Fedora), plus the exact commands used during the SUSF admin MFA registration and legacy auth hardening project.&lt;/p>
&lt;hr>
&lt;h2 id="one-time-setup-on-fedora">One-Time Setup on Fedora&lt;/h2>
&lt;h3 id="install-powershell-7">Install PowerShell 7&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>sudo dnf install powershell
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>If not in Fedora&amp;rsquo;s repos, add Microsoft&amp;rsquo;s repo first:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>curl -sSL -o /etc/yum.repos.d/microsoft.repo https://packages.microsoft.com/config/rhel/9/prod.repo
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>sudo dnf install powershell
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="launch-powershell">Launch PowerShell&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>pwsh
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="trust-psgallery-first-run-only">Trust PSGallery (First Run Only)&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-powershell" data-lang="powershell">&lt;span style="display:flex;">&lt;span>Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;hr>
&lt;h2 id="connecting-to-exchange-online">Connecting to Exchange Online&lt;/h2>
&lt;h3 id="install-module-once">Install module (once)&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-powershell" data-lang="powershell">&lt;span style="display:flex;">&lt;span>Install-Module -Name ExchangeOnlineManagement -Scope CurrentUser
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="connect">Connect&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-powershell" data-lang="powershell">&lt;span style="display:flex;">&lt;span>Import-Module ExchangeOnlineManagement
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>Connect-ExchangeOnline -UserPrincipalName itadmin@yourdomain.onmicrosoft.com
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Uses a browser/device-code sign-in flow.&lt;/p></description></item></channel></rss>