<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://thepc.co/feed.xml" rel="self" type="application/atom+xml" /><link href="https://thepc.co/" rel="alternate" type="text/html" /><updated>2026-02-07T00:24:26+00:00</updated><id>https://thepc.co/feed.xml</id><title type="html">thepc.co</title><subtitle>I like to create stuff, play stuff, and learn new things along the way...</subtitle><entry><title type="html">Testing Action1’s Patch Management Solution</title><link href="https://thepc.co/action1;/patch/management;/mdm/2025/11/08/testing-action1.html" rel="alternate" type="text/html" title="Testing Action1’s Patch Management Solution" /><published>2025-11-08T05:00:02+00:00</published><updated>2025-11-08T05:00:02+00:00</updated><id>https://thepc.co/action1;/patch/management;/mdm/2025/11/08/testing-action1</id><content type="html" xml:base="https://thepc.co/action1;/patch/management;/mdm/2025/11/08/testing-action1.html"><![CDATA[<p>This week I dived into testing some endpoint automation tools. These can be invaluable tools that SMBs can use reduce their endpoint risks and start to get a grasp on their fleet of servers, workstations, and all installed software. In simple terms, you install a lightweight agent on each of your endpoints that then reports back to Action1’s cloud dashboard. In this dashboard, you can schedule and push out OS updates, third-party application patches, run reports of vulnerabilities, and set up alerts on high-risk devices. Some of these tools even have the capability to do screensharing for help-desk sessions. All of the ones I am testing have at least some component of self-hosting, and all or some of the features mentioned above. For my first test, I am using <a href="https://www.action1.com/">Action1</a>. Action1 touts itself as a replacement for WSUS and a great tool for “work-from-anywhere workplaces with no VPN”. They are SOC 2 Type II certified and highlight some large customers like ebay, Coca-Cola, and Nestle. Their co-founder, Mike Walters, is also the co-founder of the data-security tool Netwrix.</p>

<h3 id="sign-up-and-setup">Sign-up and Setup</h3>
<p>Action1 has a pretty generous free tier; you can manage up to 200 endpoints for free. Additionally, the sign up process, downloads and documentation are free and open, no sales demos or calls needed. Check out the full details of the free tier here: <a href="https://www.action1.com/free-edition/">https://www.action1.com/free-edition/</a></p>

<p>After creating an account, you are brought to an empty dashboard. Simply download and install the relevant agent for your OS (Windows or MacOS) and you will start seeing your dashboard populate with data. Note that Linux support is on their roadmap and coming soon. I have to say, it is quite a nice layout:</p>

<p><img src="/img/act1_1.png" alt="act1_1" title="Action1 Dashboard" /></p>

<h3 id="automating-agent-deployment">Automating Agent Deployment</h3>
<p>For SMBs, you won’t want to be manuallly installing the Action1 agent on all your endpoints. Instead, you will want to use Action1 Deployer. The requirements for the deployer are pretty basic, check them out here: <a href="https://www.action1.com/documentation/action1-deployer-recommended/">https://www.action1.com/documentation/action1-deployer-recommended/</a>. You will also need to set up a service account that will have admin permissions on the endpoints you plan on managing. This service account needs:</p>

<p><img src="/img/act1_2.png" alt="act1_2" title="Service Account Requirements" /></p>

<p>As recommended, I created a service account specific to Action1. I then added that service account to the AD group that I have added as an administrator on all workstations.</p>

<p>To run the deployer, I spun up a Server 2022 VM and launched the Action1 Deployer installer. After installation, the deployer launches a cmd window and prompts for your service account and its credentials. This is where I ran into my first issue. For the life of me, I could not get it to accept the service account’s password. After trying everything I could think of, I ran across a <a href="https://www.reddit.com/r/Action1/comments/1iy130e/active_directory_deployer_password_character_issue/">Reddit</a> post of someone with the same issue. Apparently, it has to do with some password characters? Well, a reset of my service accounts password to…something else…fixed the issue, and I was on to the next speed bump. And that was that the Action1 service would not start. This one I didn’t need Reddit for; it was because my service account didn’t have permissions to start the service on my Deployer server. Maybe Action1 assumes that you will give it administrative permissions, or maybe I completely missed that requirement (I still can’t find it), but adding the account as an admin on the server fixed the issue.</p>

<p><img src="/img/act1_3.png" alt="act1_3" title="Deployer Account Setup" /></p>

<p>Now that the Deployer service is humming along, back in the Action1 console it is connected and ready for configuration. This configuration is pretty basic; what do you want it to push the agent to? Add in your OUs and exlude/include anything you want:</p>

<p><img src="/img/act1_4.png" alt="act1_4" title="Agent Deployment Setup" /></p>

<h3 id="push-some-updates">Push some Updates</h3>
<p>Now that the agent is installed on some workstations, I pushed a simple Microsoft Edge update to test:</p>

<p><img src="/img/act1_5.png" alt="act1_5" title="Pushing an update" /></p>

<p><img src="/img/act1_6.png" alt="act1_6" title="Pushing an update" /></p>

<p><img src="/img/act1_7.png" alt="act1_7" title="Pushing an update" /></p>

<p><img src="/img/act1_8.png" alt="act1_8" title="Pushing an update" /></p>

<p>Super simple. Select the update, set who gets it, schedule it, and watch it go. All in, it took about 10 mins for the update to hit the workstation and start installing.</p>

<h3 id="push-some-apps">Push Some Apps</h3>
<p>Now let’s push a third-party application out. Here I am installing 7-Zip on a Windows 11 workstation:</p>

<p><img src="/img/act1_9.png" alt="act1_9" title="Pushing an application" /></p>

<p><img src="/img/act1_10.png" alt="act1_10" title="Pushing an application" /></p>

<p><img src="/img/act1_11.png" alt="act1_11" title="Pushing an application" /></p>

<p><img src="/img/act1_12.png" alt="act1_12" title="Pushing an application" /></p>

<p><img src="/img/act1_13.png" alt="act1_13" title="Pushing an application" /></p>

<p><img src="/img/act1_14.png" alt="act1_14" title="Pushing an application" /></p>

<p>Just like with the Edge update, the third-party app push was simple and quick.</p>

<h2 id="wrap-up">Wrap-up</h2>
<p>In just a few hours I was able to set up Action1 and its automated agent deployment tool. I really like the modern user interface of Action1’s dashboard. It seems to have plenty of items in its toolbox and some decent reporting capabilities. I also like the option of using the Action1 deployer to ensure that any newly added domain devices will get the agent installed. This could be a really great add for SMBs who don’t want to dive into another MDM tool’s licensing cost (Intune, JAMF, etc).</p>]]></content><author><name></name></author><category term="Action1;" /><category term="Patch" /><category term="Management;" /><category term="MDM" /><summary type="html"><![CDATA[This week I dived into testing some endpoint automation tools. These can be invaluable tools that SMBs can use reduce their endpoint risks and start to get a grasp on their fleet of servers, workstations, and all installed software. In simple terms, you install a lightweight agent on each of your endpoints that then reports back to Action1’s cloud dashboard. In this dashboard, you can schedule and push out OS updates, third-party application patches, run reports of vulnerabilities, and set up alerts on high-risk devices. Some of these tools even have the capability to do screensharing for help-desk sessions. All of the ones I am testing have at least some component of self-hosting, and all or some of the features mentioned above. For my first test, I am using Action1. Action1 touts itself as a replacement for WSUS and a great tool for “work-from-anywhere workplaces with no VPN”. They are SOC 2 Type II certified and highlight some large customers like ebay, Coca-Cola, and Nestle. Their co-founder, Mike Walters, is also the co-founder of the data-security tool Netwrix.]]></summary></entry><entry><title type="html">Random Ep1: Fixing a Bissell Little Green Machine</title><link href="https://thepc.co/green/machine;/greenmachine;/bissell/2024/10/16/fixing-little-green-machine.html" rel="alternate" type="text/html" title="Random Ep1: Fixing a Bissell Little Green Machine" /><published>2024-10-16T05:00:02+00:00</published><updated>2024-10-16T05:00:02+00:00</updated><id>https://thepc.co/green/machine;/greenmachine;/bissell/2024/10/16/fixing-little-green-machine</id><content type="html" xml:base="https://thepc.co/green/machine;/greenmachine;/bissell/2024/10/16/fixing-little-green-machine.html"><![CDATA[<p>This week, I went on a deep dive of trying to fix a Bissell Little Green Machine. If you haven’t heard of this cleaning device, you probably don’t have pets. And if you do have it, it will probably need fixing or at least a deep clean a few times in its life. The problem that lead me down this path was the common issue of no spray from the nozel…</p>

<h4 id="note-water-electricity-and-humans-dont-go-together-great-do-be-careful">note: water, electricity and humans don’t go together great. Do be careful!</h4>

<h3 id="step-1">Step 1</h3>
<p>Watch <a href="https://youtu.be/vO9tKC9ksbU">Drew Smith’s YouTube video</a> of basic troubleshooting. It covers the easy stuff, such as checking the nozel and the solution container. To sum up these steps, you basically want to remove all the bits after the black line, at the nozzel end. If this fixes your problem, you know the issue is in the spring trigger valve or the actual nozel where water comes out. If those steps didn’t fix the problem, you can move to the below step.</p>

<h3 id="step-2">Step 2</h3>
<p>Unscrew the 6 bottom screws to take off the bottom panel. With the bottom panel off, you can see the pickup where the solution is grabbed by the pump. You can also remove the two screws (and their washers) that hold the black piece in. There is no hose clamp holding the water line to the black piece or to the pump, just a single barb. Using compressed (or canned) air, you can blow air through the black piece to ensure it is not clogged.
<img src="/img/2024-10-16(5).png" alt="2024-10-16(5)" title="Bottom Panel" /></p>

<p><img src="/img/2024-10-16(1).png" alt="2024-10-16(1)" title="Black Piece" /></p>

<h3 id="step-3">Step 3</h3>
<p>If you still don’t think you found the culprit, you can remove the top cover of the main motor and pump motor. This involves four screws up top, two on each side. On one of the sides you may need a long thin screwdriver, as it is pretty narrow.
<img src="/img/2024-10-16(2).png" alt="2024-10-16(2)" title="Top Screws Left" /></p>

<p><img src="/img/2024-10-16(3).png" alt="2024-10-16(3)" title="Top Screws Right" /></p>

<p>You can now lift off the cover a bit. Note that wires are still connected to the power switch, so do not yank the cover off; just lift it a bit to give yourself some visibility to the solution pump mechanism and its hose. Remove the tiny hose clamp from the black line and slide the hose off the pumps plastic barb fitting.</p>

<p><img src="/img/2024-10-16(4).png" alt="2024-10-16(4)" title="Solution Pump" /></p>

<p>Note that this black line is the same line that runs to the nozzel end of the hose. Here is where you can again put some compressed air into the line. As long as you have the spring loaded trigger removed from the nozel end, there should be no obstructions from end-to-end. Also, since the black hose runs inside the green vaccuum hose, you can articulate the hose back and forth to try to free up any blockages. Once enough pressure is applied, you should get quick stream of solution out of the nozzel end of the hose, and then freely flowing compressed air.</p>

<h3 id="step-4">Step 4</h3>
<p>That is it. Reattach the base parts (nozzel, pump line, solution pickup line) and do a functional check. If you got free flowing air from end-to-end of the black line, but you still have an issue. The only other part left to troubleshoot is the pump motor. The motor is clearly visible once you have the handle plastic off (see picture above). It is a basic brushed motor, so you should see a small spark from the brushes when the switch the power on. It should also get warm to the touch after running for a minute or two. I have never replaced one, but good luck…</p>]]></content><author><name></name></author><category term="Green" /><category term="Machine;" /><category term="GreenMachine;" /><category term="Bissell" /><summary type="html"><![CDATA[This week, I went on a deep dive of trying to fix a Bissell Little Green Machine. If you haven’t heard of this cleaning device, you probably don’t have pets. And if you do have it, it will probably need fixing or at least a deep clean a few times in its life. The problem that lead me down this path was the common issue of no spray from the nozel…]]></summary></entry><entry><title type="html">The Search for a Better Kanban Board</title><link href="https://thepc.co/selfhosting;/homelab;/kanban/2024/05/18/the-search-for-better-kanban.html" rel="alternate" type="text/html" title="The Search for a Better Kanban Board" /><published>2024-05-18T05:00:02+00:00</published><updated>2024-05-18T05:00:02+00:00</updated><id>https://thepc.co/selfhosting;/homelab;/kanban/2024/05/18/the-search-for-better-kanban</id><content type="html" xml:base="https://thepc.co/selfhosting;/homelab;/kanban/2024/05/18/the-search-for-better-kanban.html"><![CDATA[<p>Most folks in the system admin life, or even the software dev world, are familar with the <a href="https://www.atlassian.com/agile/kanban/boards">Kanban framework</a>. These days, every project planning or Scrum tool has a Kanban feature. Kanban has been drilled into my brain so much over the past 10 years or so that I find myself wanting to use it outside of my 9-5. For the past three or four years I have been using in my homelab environment as well. It started with literal sticky-notes; quick scribbles of something I came across online or heard about in a podcast. Sometimes I would even create a calendar event for one of my nights with a link to whatever product/project I had overheard. In search of some sort of organization, I landed on Trello (<a href="https://www.forbes.com/sites/alexkonrad/2017/01/09/atlassian-acquires-popular-team-productivity-app-trello-for-425-million/?sh=4ab4b4bf7c76">FYI, Trello was purchased by Atlassian, the makers of Jira, in 2017</a>). While I never loved my time with Trello, it was free and easy to setup. It gave me my basic To Do, Doing and Done columns that I needed. However, the mobile app was pretty ugly and with Atlassian now at the helm, it was pretty obvious that Jira would get any development time for new features or fresh coats of paint. So off I went in search for a better Kaban board for my homelab brain to use…</p>

<h3 id="staying-in-the-loop">Staying in the Loop</h3>
<p>In late 2023, <a href="https://techcommunity.microsoft.com/t5/microsoft-365-blog/microsoft-loop-built-for-the-new-way-of-work-generally-available/ba-p/3982247">Microsoft released Loop to the general public</a>. It is their everything-in-one tool that meshes OneNote (heavily), ToDo, Project/Planner and bits of many other Microsoft products. Not only does it wear a lot of hats and integrate with seemingly everything else in the Microsoft suite, but it also ties into a whole load of third-party software out there. Best of all for me, it has a built-in Kanban template.</p>

<p><img src="/img/2024-05-18(1).png" alt="2024-05-18" title="Kanban in Loop" /></p>

<h3 id="keeping-it-simple">Keeping it Simple</h3>
<p>By default, Loop has four columns (To do, On Hold, In progress and Done), but for my personal setup I like to hide the On Hold column. This is the simplest Kanban board I have ever used, and I like it especially for that reason.</p>

<h3 id="get-in-the-loop">Get (in the) Loop</h3>
<p>More Info: <a href="https://www.microsoft.com/en-us/microsoft-loop">https://www.microsoft.com/en-us/microsoft-loop</a></p>

<p>Loop for Home: <a href="https://www.microsoft.com/en-us/microsoft-365/buy/compare-all-microsoft-365-products">https://www.microsoft.com/en-us/microsoft-365/buy/compare-all-microsoft-365-products</a></p>

<p>Loop for Business: <a href="https://www.microsoft.com/en-us/microsoft-365/business/compare-all-microsoft-365-business-products">https://www.microsoft.com/en-us/microsoft-365/business/compare-all-microsoft-365-business-products</a></p>

<p>Copilot in Loop: <a href="https://copilot.cloud.microsoft/en-US/copilot-loop">https://copilot.cloud.microsoft/en-US/copilot-loop</a></p>]]></content><author><name></name></author><category term="selfhosting;" /><category term="homelab;" /><category term="kanban" /><summary type="html"><![CDATA[Most folks in the system admin life, or even the software dev world, are familar with the Kanban framework. These days, every project planning or Scrum tool has a Kanban feature. Kanban has been drilled into my brain so much over the past 10 years or so that I find myself wanting to use it outside of my 9-5. For the past three or four years I have been using in my homelab environment as well. It started with literal sticky-notes; quick scribbles of something I came across online or heard about in a podcast. Sometimes I would even create a calendar event for one of my nights with a link to whatever product/project I had overheard. In search of some sort of organization, I landed on Trello (FYI, Trello was purchased by Atlassian, the makers of Jira, in 2017). While I never loved my time with Trello, it was free and easy to setup. It gave me my basic To Do, Doing and Done columns that I needed. However, the mobile app was pretty ugly and with Atlassian now at the helm, it was pretty obvious that Jira would get any development time for new features or fresh coats of paint. So off I went in search for a better Kaban board for my homelab brain to use…]]></summary></entry><entry><title type="html">State of the Lab - 2024</title><link href="https://thepc.co/selfhosting;/homelab;/xcp-ng/2024/01/01/state-of-lab-2024.html" rel="alternate" type="text/html" title="State of the Lab - 2024" /><published>2024-01-01T05:00:01+00:00</published><updated>2024-01-01T05:00:01+00:00</updated><id>https://thepc.co/selfhosting;/homelab;/xcp-ng/2024/01/01/state-of-lab-2024</id><content type="html" xml:base="https://thepc.co/selfhosting;/homelab;/xcp-ng/2024/01/01/state-of-lab-2024.html"><![CDATA[<p><a href="https://thepc.co/selfhosting;/homelab;/xcp-ng/2023/01/01/state-of-lab-2023.html">Since my first post of 2023</a>, documenting what I all have running in my lab , I suppose I should do one at the start of 2024. So here we go again, State of the Lab - 2024 edition…</p>

<h3 id="networking">Networking</h3>
<p>No changes made here. My Unifi equipment has held steady and I have just been doing firmware updates. Perhaps Ubiquiti will grace us with an affordable Wifi6E access point in 2024, preferably in the form factor of the U6-Mesh.</p>

<h3 id="compute">Compute</h3>
<p>No changes here either. My two HPE ProLiant MicroServer’s (Gen 10 Plus) have been going strong. I have been updating XCP-NG and XOA as updates roll out. Perhaps the only changes I will make in 2024 here, is to add my micro Dell OptiPlex 7050 as a third host.</p>

<h3 id="storage">Storage</h3>
<p>While my storage infrastructure has not changes, I have swapped out a few disks in both of my Synology units. My DS720+ had one of its original drives start to fail. I replaced the 4 TB Seagate IronWolf drive with a certified used 10 TB Seagate Exos. The second drive in this array is still one of the original 4 TB IronWolf’s, so I am guessing I will have to replace it during 2024. However, until I change out this second drive, my available storage on my DS720+ unit remains at 4 TB, due to it being just RAID 1.</p>

<p>The second drive change I made was in my Synology DX517 expansion unit. Surprisingly, my DX517 still holds my oldest drive. Just as I said above, I’m guessing this 4 TB drive (which will hit 20k hours in less than a month) will need to be replaced in 2024. The other drives in this storage pool are not far behind, expect for one newly added 10 TB Seagate Exos, that replaced a 20k hour 4 TB drive. Since this pool can only take one drive failure, I am starting to stager the drive replacements. With the hybrid raid setup in this second pool, it currently sits at just under 21 TB of useable space.</p>

<p><img src="/img/2023-12-27(2).png" alt="2023-12-27" title="Disks" /></p>

<h3 id="projects">Projects</h3>
<h4 id="portainer">Portainer</h4>
<p>Portainer is still running, and I love how easy it makes running and managing various containers. I did, however, make some changes to my infrastructure. I moved it over to a new Rocky Linux VM that is domain joined to my Windows Active Directory tenant. This gives me the ability to use Active Directory security groups with Active Directory accounts to manage the server, instead of just using local accounts with static passwords.</p>

<h4 id="backups">Backups</h4>
<p>Veeam is still my go-to here. I love their community edition and have just been keeping it up to date with their latest v12. If you have a local storage repository, I highly recommend getting Veeam set up.</p>

<h4 id="patch-management">Patch Management</h4>
<p>I am still using ManageEngine’s Patch Manager Plus to scan for vulnerabilities and deploy Windows updates to my various Windows servers. The only changes I have made here is I am running their email alerting through SendGrid. Using SendGrid’s SMTP API has been great and is so much easier than hosting it myself.</p>

<h4 id="identity-management">Identity Management</h4>
<p>In 2022, one of my big projects was to set up a Microsoft tenant, complete with Azure AD Connect (now called Microsoft Entra ID) and then in 2023, <a href="https://thepc.co/azure/ad;/mfa;/active/directory/2023/07/23/number-matching-mfa.html">adding MFA</a>. The last change I made here was <a href="https://thepc.co/active/directory;/laps;/windows/server/2023/09/07/microsoft-laps.html">introducing LAPS</a>, which has been running just fine and rotating my local administrative credentials on my Windows servers. Also in 2022, I also <a href="https://thepc.co/synology;/synology/c2;/active/directory/2022/11/14/c2-identity-part-1.html">explored Synology’s C2 Identity Service</a>. I have not seen much movement on Synology’s side here, as far as adding features goes, so I have not explored it any further.</p>

<h4 id="monitoring">Monitoring</h4>
<p>This is sort of a new one for me. In 2022 and 2023, I had been using Uptime Kuma on and off. While I do believe it is a great tool and it creates a super simple up/down splash page, I wanted to venture into something a bit more complex and enterprise’ish. So, a couple months back I stood up a Zabbix virtual appliance. I am still fiddling with it and getting workloads added, but it has been a great learning experience. My experience with monitoring tools at this level has been SolarWinds, Dynatrace and New Relic, so it is always good to have some experience with another product. As I expand my monitoring to various VMs and workloads, I will be sure to create a post.</p>

<p><img src="/img/2023-12-27(1).png" alt="2023-12-27" title="Zabbix" /></p>

<h2 id="conclusion">Conclusion</h2>
<p>I think that about wraps it up. I haven’t made any huge changes in 2023, and I expect 2024 to be somewhat similar. But who knows, with a homelab there is always the urge to just tear everything down and built it back again…</p>]]></content><author><name></name></author><category term="selfhosting;" /><category term="homelab;" /><category term="xcp-ng" /><summary type="html"><![CDATA[Since my first post of 2023, documenting what I all have running in my lab , I suppose I should do one at the start of 2024. So here we go again, State of the Lab - 2024 edition…]]></summary></entry><entry><title type="html">Microsoft LAPS for Homelab</title><link href="https://thepc.co/active/directory;/laps;/windows/server/2023/09/07/microsoft-laps.html" rel="alternate" type="text/html" title="Microsoft LAPS for Homelab" /><published>2023-09-07T05:01:01+00:00</published><updated>2023-09-07T05:01:01+00:00</updated><id>https://thepc.co/active/directory;/laps;/windows/server/2023/09/07/microsoft-laps</id><content type="html" xml:base="https://thepc.co/active/directory;/laps;/windows/server/2023/09/07/microsoft-laps.html"><![CDATA[<p>I recently rolled out laps for some of my homelab servers. With LAPS enabled, I no longer have to keep a list of local administrator passwords for my Windows servers. It also prevents you from having one local administrative password across all your VMs.</p>

<h1 id="prereqs">Prereqs</h1>
<p>First, LAPS is a newer feature and only supported on newer OS versions. See: <a href="https://learn.microsoft.com/en-us/windows-server/identity/laps/laps-overview#windows-laps-supported-platforms">Supported Platforms</a></p>

<p>This one is kind of obvious, but the VMs must be either Azure Active Directory or Active Directory joined (or hybrid).</p>

<p>DFL of 2016 or higher.</p>

<h1 id="implementation">Implementation</h1>

<p>My devices are domain joined so I will be proceeding with the steps for that scenario.</p>

<p>1) First, I made sure my account was in the schema admins group. This built-in AD group is domain\Schema Admins. If you just added your admin account to that group, you may need to log off and back on again, before running the below PowerShell command.</p>

<p>2) Then I can run the schema extensions PowerShell command from one of my 2019 or 2022 domain controllers</p>

<div class="language-powershell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">Update-LapsADSchema</span><span class="w"> </span><span class="nt">-Verbose</span><span class="w">
</span></code></pre></div></div>

<p>3) I also created a test OU for this. I then created a LAPS GPO and applied it to the OU (make sure you move at least one test VM to that OU). LAPS configuration can be found at Computer Configuration -&gt; Policies -&gt; Administrative Templates -&gt; System -&gt; LAPS.</p>

<p><img src="/img/2023-09-07(1).png" alt="2023-09-07(1).png" title="GPO" /></p>

<p>4) Lastly, I had to grant permission for LAPS to reset the local passwords. In the PowerShell line below, “Laps Test” is the name of my test OU. This field accepts either the name or distinguishedName. Both examples below:</p>

<div class="language-powershell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">Set-LapsADComputerSelfPermission</span><span class="w"> </span><span class="nt">-Identity</span><span class="w"> </span><span class="s2">"Laps Test"</span><span class="w">
</span></code></pre></div></div>

<div class="language-powershell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">Set-LapsADComputerSelfPermission</span><span class="w"> </span><span class="nt">-Identity</span><span class="w"> </span><span class="s2">"OU=Laps Test,DC=your,DC=domain"</span><span class="w">
</span></code></pre></div></div>

<h1 id="testing-and-verification">Testing and Verification</h1>
<p>Now that everything is set up and has had time to sync, I can test it out and make sure I am rotating the local administrator password on one of my test servers.</p>

<p>On one of my domain controllers I ran the following command to get the password of my test server named “xcpconfigmgr”</p>

<div class="language-powershell highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">Get-LapsADPassword</span><span class="w"> </span><span class="nt">-Identity</span><span class="w"> </span><span class="nx">xcpconfigmgr</span><span class="w"> </span><span class="nt">-AsPlainText</span><span class="w">
</span></code></pre></div></div>

<p>And the output I got</p>

<p><img src="/img/2023-09-07(2).png" alt="2023-09-07(2).png" title="PowerShell output" /></p>

<p>I can then test that password by logging in as the local admin account.</p>

<p>If you run into any issues, take a look at Event Viewer on the target workstation (Applications and Services Logs -&gt; Microsoft -&gt; Windows -&gt; LAPS)</p>

<p><img src="/img/2023-09-07(3).png" alt="2023-09-07(3).png" title="Event Viewer" /></p>

<!--URL Block-->

<!--Picture Block-->]]></content><author><name></name></author><category term="Active" /><category term="Directory;" /><category term="LAPS;" /><category term="Windows" /><category term="Server" /><summary type="html"><![CDATA[I recently rolled out laps for some of my homelab servers. With LAPS enabled, I no longer have to keep a list of local administrator passwords for my Windows servers. It also prevents you from having one local administrative password across all your VMs.]]></summary></entry><entry><title type="html">Enable Number Matching for Azure MFA</title><link href="https://thepc.co/azure/ad;/mfa;/active/directory/2023/07/23/number-matching-mfa.html" rel="alternate" type="text/html" title="Enable Number Matching for Azure MFA" /><published>2023-07-23T05:01:01+00:00</published><updated>2023-07-23T05:01:01+00:00</updated><id>https://thepc.co/azure/ad;/mfa;/active/directory/2023/07/23/number-matching-mfa</id><content type="html" xml:base="https://thepc.co/azure/ad;/mfa;/active/directory/2023/07/23/number-matching-mfa.html"><![CDATA[<p>This is a short guide one how to enable number matching in Azure Active Directory. Number Matching is <a href="https://www.cisa.gov/sites/default/files/publications/fact-sheet-implement-number-matching-in-mfa-applications-508c.pdf">Microsoft’s latest step in combating MFA fatigue attacks</a>.</p>

<h3 id="enabling-in-azure-portal">Enabling in Azure Portal</h3>
<p>1) Log into portal.azure.com with your priviledged account and open Azure Active Directory.</p>

<p>2) On the left side, select Security</p>

<p><img src="/img/2023-07-24(1).png" alt="2023-07-24(1).png" title="Manage" /></p>

<p>3) Then under Manage, click Authentication Methods</p>

<p><img src="/img/2023-07-24(2).png" alt="2023-07-24(2).png" title="Authentication Methods" /></p>

<p>4) Under Authentication Methods, choose Microsoft Authenticator</p>

<p><img src="/img/2023-07-24(3).png" alt="2023-07-24(3).png" title="Microsoft Authenticator" /></p>

<p>5) Now comes the time to configure or re-configure the actual policy. What you have already set may differ from my screenshots. In my example I am creating forcing Microsoft Authenticator to a test Azure AD group. Note that the option to not use number matching is actually disabled, as Microsoft is already enforcing this.</p>

<p><img src="/img/2023-07-24(4).png" alt="2023-07-24(4).png" title="Microsoft Test Group" /></p>

<p><img src="/img/2023-07-24(5).png" alt="2023-07-24(5).png" title="Number Matching Enforced" /></p>

<h3 id="testing">Testing</h3>
<p>Now, with the test user you enabled the policy for, log out and back into something (Office 365, Azure, etc). You should be prompted with a randomly generated number on the application you are signing into. Additionally, you should receive a notification on your mobile device. This will include the text box where you enter the number, along with the geographical location of the sign-in and the application name. If you don’t get prompted to MFA, you may need to wait a while or lower your token expiry length.</p>

<!--URL Block-->

<!--Picture Block-->]]></content><author><name></name></author><category term="Azure" /><category term="AD;" /><category term="MFA;" /><category term="Active" /><category term="Directory" /><summary type="html"><![CDATA[This is a short guide one how to enable number matching in Azure Active Directory. Number Matching is Microsoft’s latest step in combating MFA fatigue attacks.]]></summary></entry><entry><title type="html">State of the Lab - 2023</title><link href="https://thepc.co/selfhosting;/homelab;/xcp-ng/2023/01/01/state-of-lab-2023.html" rel="alternate" type="text/html" title="State of the Lab - 2023" /><published>2023-01-01T05:01:01+00:00</published><updated>2023-01-01T05:01:01+00:00</updated><id>https://thepc.co/selfhosting;/homelab;/xcp-ng/2023/01/01/state-of-lab-2023</id><content type="html" xml:base="https://thepc.co/selfhosting;/homelab;/xcp-ng/2023/01/01/state-of-lab-2023.html"><![CDATA[<p>Taking some inspiration from the more popular self-hosting YouTubers, I am going to start a yearly round-up of the current state of my homelab. So here we go, State of the Lab - 2023 edition…</p>

<h3 id="networking">Networking</h3>
<p>My home network mostly consists of Unifi devices. That is; a Unifi Dream Machine, a USW-Lite 16 port POE switch, a USW Flex Mini, a US-8 8 Port POE switch, and a U6-Mesh AP.
<img src="/img/2022-12-27(1).png" alt="2022-12-27" title="Network Diagram" /></p>

<p>This has been a great setup for me. Unifi is a great solution for homes that want easy management but the ability to configure advanced features. I have not ran into any of the software/firmware issues and all my products were bought before the supply chain issues.</p>

<h3 id="compute">Compute</h3>
<p>The main portion of my compute are two HPE ProLiant MicroServer Gen10 Plus. I have the Xeon chip versions with the optional ILO out-of-band-management cards. These two are in an XCP-NG pool.
<img src="/img/2022-12-27(2).png" alt="2022-12-27" title="XCP-NG" /></p>

<h2 id="storage">Storage</h2>
<p>For storage I am using a Synology unit. It is the DS720+ with the DX517 expansion unit. That gives me a total of seven drive bays and two M.2 slots for cache SSDs.</p>

<p><img src="/img/2022-12-27(3).png" alt="2022-12-27" title="Synology" /></p>

<p>Using Synology’s SHR for redundancy, I can use drives of different sizes. The drives are broken into two storage pools. One providing storage for the Synology OS and the other providing iSCSI LUNs for the XCP-NG cluster.</p>

<p><img src="/img/2022-12-27(4).png" alt="2022-12-27" title="Synology" /></p>

<h2 id="projects">Projects</h2>

<h3 id="portainer">Portainer</h3>
<p>I am running Docker with Portainer on the XCP-NG pool. I currently have <a href="https://github.com/codetheweb/muse">Muse</a>, a self-hosted Discord bot, and the monitoring tool <a href="https://github.com/louislam/uptime-kuma">Uptime-Kuma</a>.</p>

<p><img src="/img/2022-12-27(5).png" alt="2022-12-27" title="Portainer" /></p>

<h3 id="backups">Backups</h3>
<p>Most of my backup tasks are handled by a self-hosted Veeam instance. I am using their community edition, running on Server 2022, and backing up to my Synology. It currently backs up a few servers and does file level backups on one other desktop. These all run on a schedule and I have never had any issues.</p>

<p><img src="/img/2022-12-27(6).png" alt="2022-12-27" title="Veeam" /></p>

<h3 id="patch-management">Patch Management</h3>
<p>This is something I hadn’t set up before, but has been a pretty slick addition. I am using ManageEngine’s Patch Manager Plus to report on vulnerabilities within my homelab, and also push out patches. Here is one expample of how the dashboard looks:</p>

<p><img src="/img/2022-12-27(7).png" alt="2022-12-27" title="ManageEngine PMP" /></p>

<h3 id="identity-management">Identity Management</h3>
<p>I have had an on-prem Active Directory domain set up for a while. I mainly use this for testing solutions in a lab environment. I also use it for authentication for a few apps (like ManageEngine above). New to my lab is Microsoft’s Azure AD. I am using Azure AD Connect to sync my on-premise directory to Azure AD. This has let me explore and test a whole lot more with Microsoft’s cloud offerings. I also explored Synology’s new C2 Identity Service, but wasn’t too impressed. Perhaps I will explore it later down the road.</p>

<p><img src="/img/2022-12-27(8).png" alt="2022-12-27" title="Azure AD Connect" /></p>

<h3 id="conclusion">Conclusion</h3>
<p>I think that about wraps it up! I have plenty of ideas left to try out in 2023, but feel free to make suggestions at my contact info below.</p>]]></content><author><name></name></author><category term="selfhosting;" /><category term="homelab;" /><category term="xcp-ng" /><summary type="html"><![CDATA[Taking some inspiration from the more popular self-hosting YouTubers, I am going to start a yearly round-up of the current state of my homelab. So here we go, State of the Lab - 2023 edition…]]></summary></entry><entry><title type="html">Setting up a Secondary Azure AD Connect Server in Staging Mode</title><link href="https://thepc.co/azure/ad;/active/directory;/directory/2022/12/17/secondary-ad-connect.html" rel="alternate" type="text/html" title="Setting up a Secondary Azure AD Connect Server in Staging Mode" /><published>2022-12-17T01:28:00+00:00</published><updated>2022-12-17T01:28:00+00:00</updated><id>https://thepc.co/azure/ad;/active/directory;/directory/2022/12/17/secondary-ad-connect</id><content type="html" xml:base="https://thepc.co/azure/ad;/active/directory;/directory/2022/12/17/secondary-ad-connect.html"><![CDATA[<p>If you are already using Azure Active Directory Connect to sync your on-premise Active Directory to Azure AD, then you should set up a secondary server for a backup. This second server can run in ‘staging’ mode, which means it can still be active but it will not sync any changes with Azure AD. If your primary sync server were to run into issues, you can easily flip your second sync server into active mode.</p>

<h2 id="agent-install">Agent Install</h2>

<p>Download the latest agent on a second domain controller: <a href="https://www.microsoft.com/en-us/download/details.aspx?id=47594">Download Link</a></p>

<p>Launch the installer, accept the license terms and click continue</p>

<p><img src="/img/2022-12-16(1).png" alt="2022-12-16" title="Azure AD Connect Installer" /></p>

<p>Clicking customize will show you some advanced settings. For this example, I am going to stick with the express settings</p>

<p><img src="/img/2022-12-16(2).png" alt="2022-12-16" title="Azure AD Connect Installer" /></p>

<p>Enter the credentials for an Azure AD global admin account</p>

<p><img src="/img/2022-12-16(3).png" alt="2022-12-16" title="Azure AD Connect Installer" /></p>

<p>Enter the credentials of an AD enterprise admin account</p>

<p><img src="/img/2022-12-16(4).png" alt="2022-12-16" title="Azure AD Connect Installer" /></p>

<p>On the final screen, leave the “Start the synchronization process…” option unchecked</p>

<p><img src="/img/2022-12-16(5).png" alt="2022-12-16" title="Azure AD Connect Installer" /></p>

<h2 id="configuring-staging-mode">Configuring Staging Mode</h2>

<p>Reopen Azure AD Connect, and choose Configure</p>

<p><img src="/img/2022-12-16(6).png" alt="2022-12-16" title="Azure AD Connect Installer" /></p>

<p>Select the Configure staging mode task and click Next</p>

<p><img src="/img/2022-12-16(7).png" alt="2022-12-16" title="Azure AD Connect Installer" /></p>

<p>Check “Enable staging mode” and click Next</p>

<p><img src="/img/2022-12-16(8).png" alt="2022-12-16" title="Azure AD Connect Installer" /></p>

<p>On the final screen, this time you do want to check the option to start the sync process. Microsoft’s documentation explains why: “<em>It is recommended to leave the sync process on for the server in Staging Mode, so if it becomes active, it will quickly take over and won’t have to do a large sync to catch up to the current state of the AD/Azure AD sync.</em>”</p>

<p><img src="/img/2022-12-16(9).png" alt="2022-12-16" title="Azure AD Connect Installer" /></p>

<p>Done!</p>

<p><img src="/img/2022-12-16(10).png" alt="2022-12-16" title="Azure AD Connect Installer" /></p>]]></content><author><name></name></author><category term="Azure" /><category term="AD;" /><category term="Active" /><category term="Directory;" /><category term="Directory" /><summary type="html"><![CDATA[If you are already using Azure Active Directory Connect to sync your on-premise Active Directory to Azure AD, then you should set up a secondary server for a backup. This second server can run in ‘staging’ mode, which means it can still be active but it will not sync any changes with Azure AD. If your primary sync server were to run into issues, you can easily flip your second sync server into active mode.]]></summary></entry><entry><title type="html">Synology C2 Identity Integration with Active Directory</title><link href="https://thepc.co/synology;/synology/c2;/active/directory/2022/11/14/c2-identity-part-1.html" rel="alternate" type="text/html" title="Synology C2 Identity Integration with Active Directory" /><published>2022-11-14T01:28:00+00:00</published><updated>2022-11-14T01:28:00+00:00</updated><id>https://thepc.co/synology;/synology/c2;/active/directory/2022/11/14/c2-identity-part-1</id><content type="html" xml:base="https://thepc.co/synology;/synology/c2;/active/directory/2022/11/14/c2-identity-part-1.html"><![CDATA[<p>Synology just sent out an email that their <a href="https://c2.synology.com/en-global/identity/overview">C2 Identity service</a> can now sync with Active Directory. Let’s give it a try!</p>

<h2 id="its-free-for-250-users---synology-marketing-materials">It’s free (for 250 users) - Synology Marketing Materials</h2>

<p><img src="/img/2022-11-13.png" alt="2022-11-13" title="Synology Marketing Materials" /></p>

<p><img src="/img/2022-11-13(2).png" alt="2022-11-13(2)" title="Synology Marketing Materials" /></p>

<h2 id="installing-the-agent">Installing the Agent</h2>

<p>Once you sign up for the service with your Synology account and pick a domain name, you can download the C2 Identity AD Sync application.</p>

<p><img src="/img/2022-11-13(3).png" alt="2022-11-13(3)" title="Download the application" /></p>

<p>Run throught the install wizard.</p>

<p><img src="/img/2022-11-13(4).png" alt="2022-11-13(4)" title="Application Install Wizard" /></p>

<p><img src="/img/2022-11-13(5).png" alt="2022-11-13(5)" title="Application Install Wizard" /></p>

<p><img src="/img/2022-11-13(6).png" alt="2022-11-13(6)" title="Application Install Wizard" /></p>

<p><img src="/img/2022-11-13(7).png" alt="2022-11-13(7)" title="Application Install Wizard" /></p>

<h2 id="agent-setup">Agent Setup</h2>

<p>This is what I am getting on first launch, after the install completes</p>

<p><img src="/img/2022-11-13(8).png" alt="2022-11-13(8)" title="Launch Error" /></p>

<p>A reboot does not help. But whoops, turns out is it that you just need to make sure you right-click “Run as administrator”. After doing so, you will be prompted for your C2 Identity connect key, which you can copy/paste from your C2 Identity dashboard.</p>

<p><img src="/img/2022-11-13(9).png" alt="2022-11-13(9)" title="Identity connect key" /></p>

<p>After submitting your connect key, you are prompted to approve the connection in the C2 Identity admin portal</p>

<p><img src="/img/2022-11-13(10).png" alt="2022-11-13(10)" title="Approval required" /></p>

<p>Back in the admin portal, you will see the Approve option, along with the FQDN of your domain controller</p>

<p><img src="/img/2022-11-13(11).png" alt="2022-11-13(11)" title="Approve in Identity admin portal" /></p>

<p>Once approved, the directory will automatically start syncing</p>

<p><img src="/img/2022-11-13(12).png" alt="2022-11-13(12)" title="Success!" /></p>

<p><img src="/img/2022-11-13(13).png" alt="2022-11-13(13)" title="Directory sync" /></p>

<p>I’m going to let this sync run and i’ll be back to explore more of what Synology’s C2 Identity Active Directory integration has to offer.</p>]]></content><author><name></name></author><category term="Synology;" /><category term="Synology" /><category term="C2;" /><category term="Active" /><category term="Directory" /><summary type="html"><![CDATA[Synology just sent out an email that their C2 Identity service can now sync with Active Directory. Let’s give it a try!]]></summary></entry><entry><title type="html">Install and Use Exchange Online Module v2 with Modern Authentication</title><link href="https://thepc.co/o365;/office/365;/exchange/online/2022/04/23/install-and-use-exchange-online-module-v2.html" rel="alternate" type="text/html" title="Install and Use Exchange Online Module v2 with Modern Authentication" /><published>2022-04-23T22:22:00+00:00</published><updated>2022-04-23T22:22:00+00:00</updated><id>https://thepc.co/o365;/office/365;/exchange/online/2022/04/23/install-and-use-exchange-online-module-v2</id><content type="html" xml:base="https://thepc.co/o365;/office/365;/exchange/online/2022/04/23/install-and-use-exchange-online-module-v2.html"><![CDATA[<p>Haven’t you heard? Basic auth is dead. Or at least <a href="https://docs.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/deprecation-of-basic-authentication-exchange-online#when-will-this-change-take-place">dying</a>. Not only should you switch to modern authentication for Exchange Online, but you should be using the Exchange Online PowerShell V2 Module. Per Microsoft, “The module contains a small set of exclusive Exchange Online PowerShell cmdlets that are optimized for bulk data retrieval scenarios (think: thousands and thousands of objects)”. Also, older cmdlets still work. See <a href="https://docs.microsoft.com/en-us/powershell/exchange/exchange-online-powershell-v2?view=exchange-ps#how-the-exo-v2-module-works">here</a> for the full list of EXO V2 cmdlets.</p>

<h3 id="install-or-update">Install or Update</h3>
<pre><code class="language-PowerShell"># Check to see if you have the EOM Module installed already
Import-Module ExchangeOnlineManagement; Get-Module ExchangeOnlineManagement

# If yes, update it
Update-Module -Name ExchangeOnlineManagement -Scope CurrentUser

# If no, install it
Install-Module -Name ExchangeOnlineManagement -Scope CurrentUser

# Confirm installed
Import-Module ExchangeOnlineManagement; Get-Module ExchangeOnlineManagement
</code></pre>

<h3 id="connect">Connect</h3>
<pre><code class="language-PowerShell">Connect-ExchangeOnline -UserPrincipalName username@domain.com -ShowProgress $true
</code></pre>
<p>That’s it. We are now connected to EXO using modern authentication. We are also using the latest module and can use the new Get-EXO cmdlets. Below are some basics for managing an O365 environment. Some are exclusive to EXO V2 and some are not. Enjoy!</p>

<h3 id="microsoft-365-groups">Microsoft 365 Groups</h3>
<pre><code class="language-PowerShell"># Get info about M365 Group
Get-UnifiedGroup -Identity "Legal Department" | Format-List

# Add member(s)
Add-UnifiedGroupLinks -Identity "Legal Department" -LinkType Members -Links chris@contoso.com,michelle@contoso.com -confirm

# Add owner(s)
Add-UnifiedGroupLinks -Identity "Legal Department" -LinkType Owners -Links chris@contoso.com,michelle@contoso.com -confirm

# Remove member(s)
Remove-UnifiedGroupLinks -Identity "People Leaders" -LinkType Members -Links laura@contoso.com,julia@contoso.com -confirm

# Remove owner(s)
Remove-UnifiedGroupLinks -Identity "People Leaders" -LinkType Owners -Links laura@contoso.com,julia@contoso.com -confirm

# Create new
New-UnifiedGroup -accesstype Private -AutoSubscribeNewMembers -DisplayName "Group Name" -EmailAddresses groupname@contoso.com -Owner julia@contoso.com -Members chris@contoso.com,michelle@contoso.com -notes "Requested by Susan Suzzy"

# Add authorized sender(s)
Set-UnifiedGroup -Identity  "Group Name" -AcceptMessagesOnlyFrom @{add="email@contoso.com"} -confirm

# Auto subscribe new members
Set-UnifiedGroup -Identity  "Group Name" -AutoSubscribeNewMembers:$true

# Hide from GAL
Set-UnifiedGroup -Identity  "Group Name" -HiddenFromAddressListsEnabled:$true
</code></pre>
<h4 id="microsoft-365-group-common-commands-and-references">Microsoft 365 Group Common Commands and References</h4>
<p><a href="https://docs.microsoft.com/en-us/powershell/module/exchange/get-unifiedgroup">Get-UnifiedGroup</a>,
<a href="https://docs.microsoft.com/en-us/powershell/module/exchange/add-unifiedgrouplinks">Add-UnifiedGroupLinks</a>,
<a href="https://docs.microsoft.com/en-us/powershell/module/exchange/remove-unifiedgrouplinks">Remove-UnifiedGroupLinks</a>,
<a href="https://docs.microsoft.com/en-us/powershell/module/exchange/new-unifiedgroup">New-UnifiedGroup</a>,
<a href="https://docs.microsoft.com/en-us/powershell/module/exchange/set-unifiedgroup">Set-UnifiedGroup</a></p>

<h3 id="dynamic-distribution-lists">Dynamic Distribution Lists</h3>
<pre><code class="language-PowerShell"># List all dynamic distros
Get-DynamicDistributionGroup

# Get info about a specific dynamic distro
Get-DynamicDistributionGroup -Identity "all-Company" | Format-List

# list all members of a dynamic distro
$DD = Get-DynamicDistributionGroup "all-Company"; Get-Recipient -RecipientPreviewFilter $DD.RecipientFilter -OrganizationalUnit $DD.RecipientContainer

# Change A DD filter
Set-DynamicDistributionGroup -Identity "all-Company" -RecipientFilter "((RecipientType -eq 'UserMailbox') -and (Office -eq 'Main Office'))"

# Pull all members
$DD = Get-DynamicDistributionGroup "all-Company"
Get-Recipient -ResultSize Unlimited -RecipientPreviewFilter $DD.RecipientFilter -OrganizationalUnit $DD.RecipientContainer | Format-Table Name,Primary*
</code></pre>
<h4 id="dynamic-distribution-list-common-commands-and-references">Dynamic Distribution List Common Commands and References</h4>
<p><a href="https://docs.microsoft.com/en-us/powershell/module/exchange/get-dynamicdistributiongroup">Get-DynamicDistributionGroup</a>,
<a href="https://docs.microsoft.com/en-us/powershell/module/exchange/set-dynamicdistributiongroup">Set-DynamicDistributionGroup</a></p>

<h3 id="calendar-permissions">Calendar Permissions</h3>
<pre><code class="language-PowerShell"># View current permissions for user's calendar
Get-MailboxFolderPermission -Identity user@domain.com:\Calendar | ft Identity,FolderName,User,AccessRights,SharingPermissionFlags

# Set user to have Editor permissions to user's calendar | Note that Delegate will be able to do everything except view private events
# Note that -SendNotificationToUser is true and the person will get an email to accept the permissions
Set-MailboxFolderPermission -Identity user@domain.com:\Calendar -User user@domain.com -AccessRights Editor -SharingPermissionFlags Delegate -SendNotificationToUser $true

# Remove permissions
Remove-MailboxFolderPermission -Identity user@domain.com:\Calendar -User user@domain.com
</code></pre>
<h4 id="calendar-permissions-common-commands-and-references">Calendar Permissions Common Commands and References</h4>
<p><a href="https://docs.microsoft.com/en-us/powershell/module/exchange/get-mailboxfolderpermission">Get-MailboxFolderPermissions</a>,
<a href="https://docs.microsoft.com/en-us/powershell/module/exchange/set-mailboxfolderpermission">Set-MailboxFolderPermission</a>,
<a href="https://docs.microsoft.com/en-us/powershell/module/exchange/remove-mailboxfolderpermission">Remove-MailboxFolderPermission</a></p>

<h3 id="cleanup-a-mailbox">Cleanup a Mailbox</h3>
<pre><code class="language-PowerShell"># Simple mailbox check for size
Get-EXOMailboxStatistics -Identity john@contoso.com | Format-Table Name,DeletedItemCount,ItemCount,TotalDeletedItemSize,TotalItemSize

# Another query for mailbox statistics
Get-EXOMailboxFolderStatistics mailboxname@contoso.com -FolderScope RecoverableItems | Format-Table Name,FolderAndSubfolderSize,ItemsInFolderAndSubfolders

# Check mailbox retention for deleted items
Get-EXOMailbox mailboxName@contoso.com | Format-Table RetainDeletedItemsFor
# Set the mailbox retention
Set-Mailbox mailboxName@contoso.com -RetainDeletedItemsFor 30

# Check ELC status
Get-EXOMailbox mailboxName@contoso.com | Format-Table ElcProcessingDisabled
# Set ELC
Set-Mailbox mailboxName@contoso.com -ElcProcessingDisabled $true


# Clean out mailbox by searching for a phrase with a wildcard
$mbx = Get-EXOMailbox mailboxName@contoso.com;
Do {
$result = Search-Mailbox -Identity $mbx.Identity -SearchQuery 'subject:"Phrase with wildcard*"' -DeleteContent -force -WarningAction Silentlycontinue;
$result | Out-file c:\temp\mailsearch.log -append;
write-Host "Search result for username: " + $result.resultitemscount -ForegroundColor Green;
} Until ($result.resultitemscount -eq 0)

# Clean out mailbox by searching for items from a particular sender, AND a date
$inputbox = "mailboxName"
$mbx = Get-EXOMailbox $inputbox;
Do {
$result = Search-Mailbox -Identity $mbx.Identity -SearchQuery 'from:"someone@contoso.com" AND received:"02/20/2020"' -deletecontent -force -WarningAction Silentlycontinue;
write-Host "Search result for " $inputbox ": " + $result.resultitemscount -ForegroundColor Green;
 } Until ($result.resultitemscount -eq 0)
</code></pre>
<h4 id="mailbox-cleanup-commands-and-references">Mailbox Cleanup Commands and References</h4>
<p><a href="https://docs.microsoft.com/en-us/powershell/module/exchange/get-exomailboxstatistics">Get-EXOMailboxStatistics</a>,
<a href="https://docs.microsoft.com/en-us/powershell/module/exchange/get-exomailboxfolderstatistics">Get-EXOMailboxFolderStatistics</a>,
<a href="https://docs.microsoft.com/en-us/powershell/module/exchange/search-mailbox">Search-Mailbox</a>,
<a href="https://docs.microsoft.com/en-us/powershell/module/exchange/get-exomailbox">Get-EXOMailbox</a>,
<a href="https://docs.microsoft.com/en-us/powershell/module/exchange/set-mailbox">Set-Mailbox</a></p>]]></content><author><name></name></author><category term="O365;" /><category term="Office" /><category term="365;" /><category term="Exchange" /><category term="Online" /><summary type="html"><![CDATA[Haven’t you heard? Basic auth is dead. Or at least dying. Not only should you switch to modern authentication for Exchange Online, but you should be using the Exchange Online PowerShell V2 Module. Per Microsoft, “The module contains a small set of exclusive Exchange Online PowerShell cmdlets that are optimized for bulk data retrieval scenarios (think: thousands and thousands of objects)”. Also, older cmdlets still work. See here for the full list of EXO V2 cmdlets.]]></summary></entry></feed>