<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6159186316497589396</id><updated>2026-04-03T00:51:10.819-05:00</updated><category term="powershell"/><category term="SCCM"/><category term="MDT"/><category term="Miscellaneous"/><category term="vbscript"/><category term="BIOS"/><category term="Dell"/><category term="Installation"/><category term="script"/><category term="MDT 2010"/><category term="MDT 2012"/><category term="SMS"/><category term="usmt"/><category term="windows 7"/><category term="Bitlocker"/><category term="Cellular VoIP"/><category term="Install"/><category term="MIF"/><category term="MiFi VoIP"/><category term="NIC"/><category term="Remote"/><category term="SCCM 2012"/><category term="XP"/><category term="autodesk"/><category term="installation script"/><category term="learning"/><category term="msi"/><category term="orchestrator"/><category term="profile"/><category term="revit"/><category term="robocopy"/><category term="transfer"/><category term="tutorial"/><category term="0x80004005"/><category term="2012"/><category term="2013"/><category term="3G"/><category term="4G"/><category term="Adobe Flash"/><category term="AutoIT"/><category term="Blogger"/><category term="Blogspot"/><category term="Bootable"/><category term="Bootable Thumb Drive"/><category term="Bootable USB"/><category term="CVE-2017-15361"/><category term="Chrome"/><category term="Dell BIOS"/><category term="Dell BIOS Switches"/><category term="Distribution Point"/><category term="ERROR application GUID not found"/><category term="Endpoint"/><category term="Failure (ERR):68"/><category term="Flash"/><category term="Google"/><category term="HKC"/><category term="HKCU"/><category term="Hardware Inventory"/><category term="Hive"/><category term="Import"/><category term="Install MSI payload failed with error: 1603"/><category term="Installed"/><category term="Installed Updates"/><category term="JRE Uninstall"/><category term="Java Install"/><category term="Java Uninstall"/><category term="KB3050265"/><category term="LTE"/><category term="Language Packs"/><category term="List"/><category term="MDT BIOS settings"/><category term="MDT powershell"/><category term="Mobile VoIP"/><category term="OS"/><category term="Power Management"/><category term="PowerShell Reboot SQL SCCM ConfigMgr"/><category term="PowerShellStudio"/><category term="Reader"/><category term="Reader 10"/><category term="Reader 4"/><category term="Reader 5"/><category term="Reader 6"/><category term="Reader 7"/><category term="Reader 8"/><category term="Reader 9"/><category term="Reader X"/><category term="Registry"/><category term="Report Builder 2.0 is not installed"/><category term="Return value 3"/><category term="SCCM 2007"/><category term="SCCM BIOS settings"/><category term="SCCM Rerun advertisement"/><category term="SCCM WMI Repair"/><category term="SQL"/><category term="Safari"/><category term="Sapien"/><category term="ShareThis"/><category term="Software Installation"/><category term="TPM"/><category term="The file AdobePDF.dll is needed"/><category term="UDID"/><category term="UEFI"/><category term="USB Stick"/><category term="USB Thumb"/><category term="Uninstall"/><category term="Uninstall Previous"/><category term="VoIP"/><category term="VoIP only"/><category term="WMI"/><category term="WOL"/><category term="WiMax"/><category term="Windows Updates"/><category term="Windows XP"/><category term="Windows could not apply unattend settings during pass [offlineServicing]"/><category term="WindowsUpdate_0000066A"/><category term="WindowsUpdate_dt000"/><category term="ZTIBiosCheck"/><category term="access chrome bookmarks ipad"/><category term="adobepdf.dll"/><category term="advanced client"/><category term="advanced client cache"/><category term="advanced client cache size"/><category term="apply patches"/><category term="architecture"/><category term="auto-update"/><category term="automatic update"/><category term="automation"/><category term="autoupdate"/><category term="bookmark"/><category term="cache size"/><category term="capture"/><category term="cell signal"/><category term="cellular"/><category term="code 66a"/><category term="command line"/><category term="delete facebook posts"/><category term="delete old posts"/><category term="deploy application from network share"/><category term="deployment"/><category term="deployment script"/><category term="developer"/><category term="dies"/><category term="disable auto-update"/><category term="disable autoupdate"/><category term="disable quicktime task"/><category term="ditch the cell phone"/><category term="edit revit.ini script"/><category term="execute app from network share"/><category term="export"/><category term="facebook delete old posts"/><category term="failed hard drive"/><category term="failed hdd"/><category term="hdd failure"/><category term="iPad"/><category term="iPhone"/><category term="install script"/><category term="install updates offline"/><category term="installing updates"/><category term="ipad 1 slowdown"/><category term="language pack"/><category term="local administrator"/><category term="mdt internet access"/><category term="memory"/><category term="metal roof"/><category term="mif tutorial"/><category term="migration"/><category term="network"/><category term="network location"/><category term="newforma"/><category term="operating system"/><category term="optional"/><category term="orca"/><category term="pagefile size"/><category term="physical memory"/><category term="pre-mdt bios"/><category term="pre-sccm bios"/><category term="quicktime"/><category term="quicktime task"/><category term="remove facebook posts"/><category term="remove old posts"/><category term="revit visual C++ error"/><category term="revit.ini"/><category term="revit.ini vbscript"/><category term="sccm cache"/><category term="sccm cache size"/><category term="sccm internet access"/><category term="search facebook posts"/><category term="search posts"/><category term="set"/><category term="signal"/><category term="slipstream windows 7 updates"/><category term="sms cache"/><category term="sms cache size"/><category term="sort driver folder mdt"/><category term="sort drivers mdt"/><category term="sync chrome bookmarks ipad"/><category term="sysprep"/><category term="updates"/><category term="virtual memory"/><category term="visual C++"/><category term="wake on lan"/><category term="walmart"/><category term="warehouse"/><category term="weak"/><category term="weak signal"/><category term="windows update"/><title type='text'>Mick&#39;s IT Blogs</title><subtitle type='html'>My blog is here to help solve issues I have encountered and solved, publish scripts I have written, and educate others. </subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://mickitblog.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://mickitblog.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Mick Pletcher</name><uri>http://www.blogger.com/profile/09597651323688418212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1GjVWF_81hun8PvhRSvbXBJHCYVoX_UJZbi7SbHgHEXQJ8An20_JaeeW8tAwDbyQAW4jpEb0H_eL4cOgwfX3Jx4hMBbD1vdmfjsk8w0c6TNCBnkvgxUMVn54cUbe3yQ/s151/396426_10151292562288888_1032319935_n.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>372</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6159186316497589396.post-3169105152633958737</id><published>2026-03-05T01:53:00.001-06:00</published><updated>2026-04-03T00:51:10.814-05:00</updated><title type='text'>Building Out My SafeSend API and Webhook Repository</title><content type='html'>&lt;p data-end=&quot;437&quot; data-start=&quot;119&quot;&gt;Over the past few days, I have been building out a new GitHub repository focused on interacting with the SafeSend developer platform. The goal of this project is to document and implement the API functionality described in the SafeSend developer documentation while also laying the groundwork for webhook integrations.&lt;/p&gt;&lt;p data-end=&quot;472&quot; data-start=&quot;439&quot;&gt;The repository is available here:&lt;/p&gt;&lt;p data-end=&quot;514&quot; data-start=&quot;474&quot;&gt;&lt;a class=&quot;decorated-link&quot; data-end=&quot;514&quot; data-start=&quot;474&quot; href=&quot;https://github.com/mickpletcher/SafeSend&quot; rel=&quot;noopener&quot; target=&quot;_new&quot;&gt;https://github.com/mickpletcher/SafeSend&lt;span aria-hidden=&quot;true&quot; class=&quot;ms-0.5 inline-block align-middle leading-none&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; class=&quot;block h-[0.75em] w-[0.75em] stroke-current stroke-[0.75]&quot; data-rtl-flip=&quot;&quot; height=&quot;20&quot; width=&quot;20&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;use fill=&quot;currentColor&quot; href=&quot;/cdn/assets/sprites-core-fxfgsfqf.svg#304883&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p data-end=&quot;875&quot; data-start=&quot;516&quot;&gt;This project started as a way to turn the SafeSend developer site into something more practical. I rarely like to stop at reading documentation alone. I prefer to build working examples that show how APIs actually behave in real scenarios. In my experience, turning documentation into executable code is one of the fastest ways to truly understand a platform.&lt;/p&gt;&lt;h2 data-end=&quot;918&quot; data-section-id=&quot;kiwaob&quot; data-start=&quot;877&quot;&gt;What the repository currently contains&lt;/h2&gt;&lt;p data-end=&quot;1018&quot; data-start=&quot;920&quot;&gt;At this stage, the repository is a structured proof of concept focused on several core components:&lt;/p&gt;&lt;ul data-end=&quot;1275&quot; data-start=&quot;1020&quot;&gt;&lt;li data-end=&quot;1055&quot; data-section-id=&quot;jdd018&quot; data-start=&quot;1020&quot;&gt;Initial API integration framework&lt;/li&gt;&lt;li data-end=&quot;1111&quot; data-section-id=&quot;x6jauh&quot; data-start=&quot;1056&quot;&gt;Authentication handling and environment configuration&lt;/li&gt;&lt;li data-end=&quot;1170&quot; data-section-id=&quot;12dkxn8&quot; data-start=&quot;1112&quot;&gt;Example requests for interacting with SafeSend endpoints&lt;/li&gt;&lt;li data-end=&quot;1233&quot; data-section-id=&quot;19d8957&quot; data-start=&quot;1171&quot;&gt;Documentation and notes based on the SafeSend developer site&lt;/li&gt;&lt;li data-end=&quot;1275&quot; data-section-id=&quot;1yv5zu4&quot; data-start=&quot;1234&quot;&gt;Early groundwork for webhook processing&lt;/li&gt;&lt;/ul&gt;&lt;p data-end=&quot;1422&quot; data-start=&quot;1277&quot;&gt;The intent is for this repository to serve as both a learning reference and a starting point for real automation workflows built around SafeSend.&lt;/p&gt;&lt;p data-end=&quot;1701&quot; data-start=&quot;1424&quot;&gt;Anyone who works with modern APIs knows that documentation rarely tells the full story. Implementing against live endpoints often exposes edge cases, required headers, authentication nuances, and response structures that are not immediately obvious when reading the docs alone.&lt;/p&gt;&lt;h2 data-end=&quot;1742&quot; data-section-id=&quot;j6s7o3&quot; data-start=&quot;1703&quot;&gt;Webhook integration work in progress&lt;/h2&gt;&lt;p data-end=&quot;2048&quot; data-start=&quot;1744&quot;&gt;One of the most interesting parts of the SafeSend platform is its webhook capability. Webhooks allow external systems to receive event driven notifications whenever something happens inside SafeSend. Instead of repeatedly polling an API, the platform can push updates directly to an endpoint you control.&lt;/p&gt;&lt;p data-end=&quot;2091&quot; data-start=&quot;2050&quot;&gt;That makes automation far more efficient.&lt;/p&gt;&lt;p data-end=&quot;2312&quot; data-start=&quot;2093&quot;&gt;That said, the webhook implementation in this repository has not yet been tested end to end. The scaffolding and framework are in place, but I have not yet completed full validation of webhook events in a live workflow.&lt;/p&gt;&lt;p data-end=&quot;2465&quot; data-start=&quot;2314&quot;&gt;Once that portion is fully wired up and tested, it should support automated processing for events such as document status changes and workflow updates.&lt;/p&gt;&lt;h2 data-end=&quot;2497&quot; data-section-id=&quot;1m4k0lk&quot; data-start=&quot;2467&quot;&gt;Why I built this repository&lt;/h2&gt;&lt;p data-end=&quot;2692&quot; data-start=&quot;2499&quot;&gt;I tend to approach new developer platforms the same way every time. Rather than passively reading documentation, I build a working implementation that forces direct interaction with the system.&lt;/p&gt;&lt;p data-end=&quot;2735&quot; data-start=&quot;2694&quot;&gt;That process usually reveals things like:&lt;/p&gt;&lt;ul data-end=&quot;2888&quot; data-start=&quot;2737&quot;&gt;&lt;li data-end=&quot;2760&quot; data-section-id=&quot;rscnwv&quot; data-start=&quot;2737&quot;&gt;Authentication quirks&lt;/li&gt;&lt;li data-end=&quot;2801&quot; data-section-id=&quot;19qtk2r&quot; data-start=&quot;2761&quot;&gt;Required headers that are easy to miss&lt;/li&gt;&lt;li data-end=&quot;2835&quot; data-section-id=&quot;ef03sf&quot; data-start=&quot;2802&quot;&gt;Rate limits and error responses&lt;/li&gt;&lt;li data-end=&quot;2888&quot; data-section-id=&quot;qqnv5t&quot; data-start=&quot;2836&quot;&gt;Data formats that behave differently than expected&lt;/li&gt;&lt;/ul&gt;&lt;p data-end=&quot;3031&quot; data-start=&quot;2890&quot;&gt;By building a repository like this, I end up with a reusable reference that can be expanded over time and used in future automation projects.&lt;/p&gt;&lt;h2 data-end=&quot;3050&quot; data-section-id=&quot;1x53d2w&quot; data-start=&quot;3033&quot;&gt;Current status&lt;/h2&gt;&lt;p data-end=&quot;3222&quot; data-start=&quot;3052&quot;&gt;This project is still under active development. The API examples are functional, but more endpoints will be added as I continue exploring the SafeSend developer platform.&lt;/p&gt;&lt;p data-end=&quot;3470&quot; data-start=&quot;3224&quot;&gt;The webhook component is structurally in place, but it has not yet been tested or validated. Once that testing is complete, I plan to update the repository with working examples and documentation that show how to handle incoming webhook payloads.&lt;/p&gt;&lt;h2 data-end=&quot;3490&quot; data-section-id=&quot;1c3s0n3&quot; data-start=&quot;3472&quot;&gt;What comes next&lt;/h2&gt;&lt;p data-end=&quot;3538&quot; data-start=&quot;3492&quot;&gt;Over the next phase of development, I plan to:&lt;/p&gt;&lt;ul data-end=&quot;3779&quot; data-start=&quot;3540&quot;&gt;&lt;li data-end=&quot;3604&quot; data-section-id=&quot;150l352&quot; data-start=&quot;3540&quot;&gt;Expand the API examples to cover additional SafeSend endpoints&lt;/li&gt;&lt;li data-end=&quot;3660&quot; data-section-id=&quot;1tuw3i2&quot; data-start=&quot;3605&quot;&gt;Complete and test the webhook listener implementation&lt;/li&gt;&lt;li data-end=&quot;3718&quot; data-section-id=&quot;18ougvs&quot; data-start=&quot;3661&quot;&gt;Add more structured documentation inside the repository&lt;/li&gt;&lt;li data-end=&quot;3779&quot; data-section-id=&quot;o2vag3&quot; data-start=&quot;3719&quot;&gt;Build automation scenarios that demonstrate real use cases&lt;/li&gt;&lt;/ul&gt;&lt;p data-end=&quot;3959&quot; data-start=&quot;3781&quot;&gt;The long term goal is to turn this repository into a practical reference for developers who want to integrate with SafeSend and automate workflows using its API and event system.&lt;/p&gt;&lt;p data-end=&quot;4034&quot; data-start=&quot;3961&quot;&gt;If you want to follow the project, you can check out the repository here:&lt;/p&gt;&lt;p data-end=&quot;4076&quot; data-start=&quot;4036&quot;&gt;&lt;a class=&quot;decorated-link&quot; data-end=&quot;4076&quot; data-start=&quot;4036&quot; href=&quot;https://github.com/mickpletcher/SafeSend&quot; rel=&quot;noopener&quot; target=&quot;_new&quot;&gt;https://github.com/mickpletcher/SafeSend&lt;span aria-hidden=&quot;true&quot; class=&quot;ms-0.5 inline-block align-middle leading-none&quot;&gt;&lt;svg aria-hidden=&quot;true&quot; class=&quot;block h-[0.75em] w-[0.75em] stroke-current stroke-[0.75]&quot; data-rtl-flip=&quot;&quot; height=&quot;20&quot; width=&quot;20&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;&lt;use fill=&quot;currentColor&quot; href=&quot;/cdn/assets/sprites-core-fxfgsfqf.svg#304883&quot;&gt;&lt;/use&gt;&lt;/svg&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p data-end=&quot;4189&quot; data-start=&quot;4078&quot;&gt;More updates will be coming soon as the webhook testing is completed and additional API integrations are added.&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://mickitblog.blogspot.com/feeds/3169105152633958737/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mickitblog.blogspot.com/2026/03/building-out-my-safesend-api-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/3169105152633958737'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/3169105152633958737'/><link rel='alternate' type='text/html' href='http://mickitblog.blogspot.com/2026/03/building-out-my-safesend-api-and.html' title='Building Out My SafeSend API and Webhook Repository'/><author><name>Mick Pletcher</name><uri>http://www.blogger.com/profile/09597651323688418212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1GjVWF_81hun8PvhRSvbXBJHCYVoX_UJZbi7SbHgHEXQJ8An20_JaeeW8tAwDbyQAW4jpEb0H_eL4cOgwfX3Jx4hMBbD1vdmfjsk8w0c6TNCBnkvgxUMVn54cUbe3yQ/s151/396426_10151292562288888_1032319935_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159186316497589396.post-7676660801657071402</id><published>2024-05-28T12:00:00.001-05:00</published><updated>2025-10-16T12:29:53.424-05:00</updated><title type='text'>HomeKit Stops working with Meross, Kasa and other IoT devices</title><content type='html'>&lt;!-- Post: HomeKit stops working with Meross &amp; Kasa after iOS 17.3 --&gt;
&lt;h2 style=&quot;margin:0 0 12px 0;line-height:1.25&quot;&gt;HomeKit Broke After iOS 17.3? Here’s How I Fixed Meross &amp; Kasa&lt;/h2&gt;
&lt;p style=&quot;color:#6b7280;margin:0 0 14px 0&quot;&gt;Symptoms: Devices show “No Response,” automations fail, and hubs appear fine.&lt;/p&gt;

&lt;p&gt;I run HomeKit across Meross, Kasa, and others. After updating to &lt;strong&gt;iOS 17.3&lt;/strong&gt;, multiple devices went dark. Firmware updates and re-pairing didn’t help. The root cause was my &lt;strong&gt;TP-Link Deco&lt;/strong&gt; mesh blocking device-to-hub traffic.&lt;/p&gt;

&lt;hr style=&quot;border:none;border-top:1px solid #e5e7eb;margin:18px 0&quot;/&gt;

&lt;h3 style=&quot;margin:18px 0 8px 0&quot;&gt;What Didn’t Fix It&lt;/h3&gt;
&lt;ul style=&quot;margin:0 0 14px 18px&quot;&gt;
  &lt;li&gt;Updating device firmware (Meross, Kasa, etc.)&lt;/li&gt;
  &lt;li&gt;Re-adding devices to HomeKit&lt;/li&gt;
  &lt;li&gt;Rebooting hubs and access points&lt;/li&gt;
  &lt;li&gt;Waiting for “the next update”&lt;/li&gt;
&lt;/ul&gt;

&lt;div style=&quot;background:#f9fafb;border:1px solid #e5e7eb;border-radius:12px;padding:12px 14px;margin:12px 0&quot;&gt;
  &lt;strong&gt;Diagnosis&lt;/strong&gt;&lt;br/&gt;
  Wireshark showed devices attempting to reach my &lt;strong&gt;Apple TV (HomeKit hub)&lt;/strong&gt; but packets were blocked. That tells you it’s a &lt;em&gt;network&lt;/em&gt; policy problem, not a HomeKit or device firmware problem.
&lt;/div&gt;

&lt;h3 style=&quot;margin:18px 0 8px 0&quot;&gt;Fix (TP-Link Deco) — Step by Step&lt;/h3&gt;
&lt;ol style=&quot;margin:0 0 14px 18px&quot;&gt;
  &lt;li&gt;
    &lt;strong&gt;Put devices on the same SSID&lt;/strong&gt;&lt;br/&gt;
    Keep HomeKit devices on one SSID (the main network). A separate isolated “IoT” SSID can block hub discovery.
    &lt;figure style=&quot;margin:10px 0&quot;&gt;
      &lt;img src=&quot;UPLOAD_IMAGE_URL&quot; alt=&quot;Deco app: move IoT devices to main SSID&quot; style=&quot;max-width:100%;border:1px solid #e5e7eb;border-radius:12px&quot;/&gt;
      &lt;figcaption style=&quot;color:#6b7280;font-size:14px;margin-top:6px&quot;&gt;Deco → Wi-Fi → Ensure affected devices use the main SSID.&lt;/figcaption&gt;
    &lt;/figure&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;strong&gt;Force 2.4 GHz for devices that require it&lt;/strong&gt;&lt;br/&gt;
    Many plugs/switches are 2.4-only. In Deco, explicitly assign them to 2.4 GHz so they don’t roam incorrectly.
    &lt;figure style=&quot;margin:10px 0&quot;&gt;
      &lt;img src=&quot;UPLOAD_IMAGE_URL&quot; alt=&quot;Deco app: assign 2.4 GHz&quot; style=&quot;max-width:100%;border:1px solid #e5e7eb;border-radius:12px&quot;/&gt;
      &lt;figcaption style=&quot;color:#6b7280;font-size:14px;margin-top:6px&quot;&gt;Deco → Device details → Network Preference → 2.4 GHz.&lt;/figcaption&gt;
    &lt;/figure&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;strong&gt;Disable Device Isolation&lt;/strong&gt; &lt;span style=&quot;background:#f3f4f6;border:1px solid #e5e7eb;border-radius:999px;padding:2px 8px;font-size:12px;margin-left:6px&quot;&gt;Key step&lt;/span&gt;&lt;br/&gt;
    This allows devices to reach your Apple TV/HomePod hub for HomeKit. After turning this off, everything came back immediately.
    &lt;ul style=&quot;margin:8px 0 0 18px&quot;&gt;
      &lt;li&gt;&lt;strong&gt;Kasa&lt;/strong&gt; and &lt;strong&gt;Mysa&lt;/strong&gt; needed isolation off&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;Meross&lt;/strong&gt; worked with isolation on, but I recommend off for consistency&lt;/li&gt;
    &lt;/ul&gt;
    &lt;figure style=&quot;margin:10px 0&quot;&gt;
      &lt;img src=&quot;UPLOAD_IMAGE_URL&quot; alt=&quot;Deco app: disable device isolation&quot; style=&quot;max-width:100%;border:1px solid #e5e7eb;border-radius:12px&quot;/&gt;
      &lt;figcaption style=&quot;color:#6b7280;font-size:14px;margin-top:6px&quot;&gt;Deco → Wi-Fi or IoT Network → Advanced → disable Device Isolation.&lt;/figcaption&gt;
    &lt;/figure&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;div style=&quot;background:#f9fafb;border:1px solid #e5e7eb;border-radius:12px;padding:12px 14px;margin:12px 0&quot;&gt;
  &lt;strong&gt;Note on the hub&lt;/strong&gt;&lt;br/&gt;
  Your Apple TV/HomePod can be on 5 GHz or 2.4 GHz. Once Device Isolation is off and all devices share the same SSID, the hub will communicate with 2.4-only devices without issues.
&lt;/div&gt;

&lt;h3 style=&quot;margin:18px 0 8px 0&quot;&gt;TL;DR&lt;/h3&gt;
&lt;table style=&quot;width:100%;border-collapse:collapse;border:1px solid #e5e7eb&quot;&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border:1px solid #e5e7eb;padding:8px&quot;&gt;&lt;strong&gt;Symptom&lt;/strong&gt;&lt;/td&gt;
      &lt;td style=&quot;border:1px solid #e5e7eb;padding:8px&quot;&gt;Devices “No Response” after iOS 17.3&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border:1px solid #e5e7eb;padding:8px&quot;&gt;&lt;strong&gt;Cause&lt;/strong&gt;&lt;/td&gt;
      &lt;td style=&quot;border:1px solid #e5e7eb;padding:8px&quot;&gt;Router policy (Deco) blocked device-to-hub traffic&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td style=&quot;border:1px solid #e5e7eb;padding:8px&quot;&gt;&lt;strong&gt;Fix&lt;/strong&gt;&lt;/td&gt;
      &lt;td style=&quot;border:1px solid #e5e7eb;padding:8px&quot;&gt;Same SSID + force 2.4 GHz for 2.4-only devices + &lt;strong&gt;disable Device Isolation&lt;/strong&gt;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;h3 style=&quot;margin:18px 0 8px 0&quot;&gt;Troubleshooting Checklist&lt;/h3&gt;
&lt;ul style=&quot;margin:0 0 14px 18px&quot;&gt;
  &lt;li&gt;Devices and hub on the &lt;strong&gt;same SSID&lt;/strong&gt;&lt;/li&gt;
  &lt;li&gt;2.4-only devices &lt;strong&gt;forced to 2.4 GHz&lt;/strong&gt;&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Device Isolation disabled&lt;/strong&gt; on the SSID they use&lt;/li&gt;
  &lt;li&gt;Power-cycle the affected devices and the hub&lt;/li&gt;
  &lt;li&gt;Re-test discovery; if still failing, check packets (mDNS, TCP) between device and hub&lt;/li&gt;
&lt;/ul&gt;

&lt;hr style=&quot;border:none;border-top:1px solid #e5e7eb;margin:18px 0&quot;/&gt;

&lt;p style=&quot;color:#6b7280;margin:0&quot;&gt;Brands in my tests: Meross (OK with isolation on), Kasa (needs isolation off), Mysa (needs isolation off). Your mileage may vary, but the network policy was the blocker.&lt;/p&gt;

&lt;!-- Optional: add labels/tags in Blogger editor: HomeKit, iOS 17.3, TP-Link Deco, Meross, Kasa, Mysa, Device Isolation, 2.4 GHz --&gt;
</content><link rel='replies' type='application/atom+xml' href='http://mickitblog.blogspot.com/feeds/7676660801657071402/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mickitblog.blogspot.com/2024/05/homekit-stops-working-with-meross-kasa.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/7676660801657071402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/7676660801657071402'/><link rel='alternate' type='text/html' href='http://mickitblog.blogspot.com/2024/05/homekit-stops-working-with-meross-kasa.html' title='HomeKit Stops working with Meross, Kasa and other IoT devices'/><author><name>Mick Pletcher</name><uri>http://www.blogger.com/profile/09597651323688418212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1GjVWF_81hun8PvhRSvbXBJHCYVoX_UJZbi7SbHgHEXQJ8An20_JaeeW8tAwDbyQAW4jpEb0H_eL4cOgwfX3Jx4hMBbD1vdmfjsk8w0c6TNCBnkvgxUMVn54cUbe3yQ/s151/396426_10151292562288888_1032319935_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159186316497589396.post-7017400540922209676</id><published>2023-04-07T10:05:00.001-05:00</published><updated>2023-04-07T10:05:16.278-05:00</updated><title type='text'>Trigger Windows Update in ConfigMgr without PowerShell</title><content type='html'>&lt;div&gt;&lt;span style=&quot;background-color: #f7f7f8; color: #374151; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; white-space: pre-wrap;&quot;&gt;I&#39;ve been meaning to share this blog post for some time now, and finally got around to it. If you need to trigger a Windows update without using PowerShell, there is a way to do it. In newer versions of Windows 10, usoclient.exe is used to initiate an update scan. However, most of its parameters no longer work except for startinteractivescan. The issue I faced was that it had to be executed as the system account or as the end user in ConfigMgr. Although ConfigMgr runs installations with the system account, it did not work with usoclient.exe. The solution was to use psexec.exe with the -s parameter to trigger it. I ran it as a task sequence, but you can also execute it under a package. I had already pushed psexec.exe to all systems in my environment, but you may need to include it in the package and run it from there. Don&#39;t forget to use the -accepteula parameter; otherwise, it will hang if it has never been executed on a machine before.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style=&quot;background-color: #f7f7f8; color: #374151; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; white-space: pre-wrap;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4ovEFMc6yLdo1esFtoPlMnlvjeigVachh9BDu5drXFfjLhfG8eJ2DQ9u9IPJVIkH3nluKAHmNl0X-EYpFbTrD7TWBc-FMRY256_tuDnJIt9ZgL0TAIn5X77R0aFBIdsmypSlfi81BaTWELd8qwbjOSPrHdC4rYUA8ytw9m1AZsC5Brge0GV4O1HQU/s930/WindowsUpdate.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;930&quot; data-original-width=&quot;817&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4ovEFMc6yLdo1esFtoPlMnlvjeigVachh9BDu5drXFfjLhfG8eJ2DQ9u9IPJVIkH3nluKAHmNl0X-EYpFbTrD7TWBc-FMRY256_tuDnJIt9ZgL0TAIn5X77R0aFBIdsmypSlfi81BaTWELd8qwbjOSPrHdC4rYUA8ytw9m1AZsC5Brge0GV4O1HQU/w562-h640/WindowsUpdate.JPG&quot; width=&quot;562&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;span style=&quot;background-color: #f7f7f8; color: #374151; font-family: Söhne, ui-sans-serif, system-ui, -apple-system, &amp;quot;Segoe UI&amp;quot;, Roboto, Ubuntu, Cantarell, &amp;quot;Noto Sans&amp;quot;, sans-serif, &amp;quot;Helvetica Neue&amp;quot;, Arial, &amp;quot;Apple Color Emoji&amp;quot;, &amp;quot;Segoe UI Emoji&amp;quot;, &amp;quot;Segoe UI Symbol&amp;quot;, &amp;quot;Noto Color Emoji&amp;quot;; font-size: 16px; white-space: pre-wrap;&quot;&gt;If you observe the Check for Updates window while executing the package in Software Center, you can see it initiate the update scan, as demonstrated below.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4v4ceRQZWi7cSzwDWawx2AA9qH34yMjWS_O6Kqzn9AlClMzpWuY7lp4WErcs6w5ZHzdI_I58WEDidBIfVI7-IakCZH9R8PixFgk52Cl713g26lqt8wFfXsFtkG-9bKwKMEEkVW20XmeYFje8Xc4HO831XK9fZ_irThFAsQ13KDqVOL41REVhk-IL2/s625/TriggerUpdate.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;625&quot; data-original-width=&quot;505&quot; height=&quot;640&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4v4ceRQZWi7cSzwDWawx2AA9qH34yMjWS_O6Kqzn9AlClMzpWuY7lp4WErcs6w5ZHzdI_I58WEDidBIfVI7-IakCZH9R8PixFgk52Cl713g26lqt8wFfXsFtkG-9bKwKMEEkVW20XmeYFje8Xc4HO831XK9fZ_irThFAsQ13KDqVOL41REVhk-IL2/w518-h640/TriggerUpdate.JPG&quot; width=&quot;518&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mickitblog.blogspot.com/feeds/7017400540922209676/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mickitblog.blogspot.com/2023/04/trigger-windows-update-in-configmgr.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/7017400540922209676'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/7017400540922209676'/><link rel='alternate' type='text/html' href='http://mickitblog.blogspot.com/2023/04/trigger-windows-update-in-configmgr.html' title='Trigger Windows Update in ConfigMgr without PowerShell'/><author><name>Mick Pletcher</name><uri>http://www.blogger.com/profile/09597651323688418212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1GjVWF_81hun8PvhRSvbXBJHCYVoX_UJZbi7SbHgHEXQJ8An20_JaeeW8tAwDbyQAW4jpEb0H_eL4cOgwfX3Jx4hMBbD1vdmfjsk8w0c6TNCBnkvgxUMVn54cUbe3yQ/s151/396426_10151292562288888_1032319935_n.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4ovEFMc6yLdo1esFtoPlMnlvjeigVachh9BDu5drXFfjLhfG8eJ2DQ9u9IPJVIkH3nluKAHmNl0X-EYpFbTrD7TWBc-FMRY256_tuDnJIt9ZgL0TAIn5X77R0aFBIdsmypSlfi81BaTWELd8qwbjOSPrHdC4rYUA8ytw9m1AZsC5Brge0GV4O1HQU/s72-w562-h640-c/WindowsUpdate.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159186316497589396.post-6273196915241560259</id><published>2022-09-06T13:32:00.003-05:00</published><updated>2022-09-06T13:32:52.615-05:00</updated><title type='text'>Imaging using MDT with Autopilot</title><content type='html'>&lt;p&gt;If you have a system that has been infected or the drive had to be replaced, you&#39;ll need to lay down a new bare OS and then have autopilot finish up the configuration of the machine. For this, we are using MDT as it is easy to maintain and very fast at imaging.&amp;nbsp;&lt;/p&gt;&lt;p&gt;I used &lt;a href=&quot;https://osddeployment.dk/2018/12/08/how-to-deploy-autopilot-device-fast-with-mdt/&quot; target=&quot;_blank&quot;&gt;this&lt;/a&gt; as a template to come up with the solution we are now using. The first thing I did was to use everything verbatim from the section of the blog named &quot;How to get the Windows Autopilot payload&quot;. It is the next section&amp;nbsp;How to customize the MDT Task Sequence for Autopilot that I diverged from. I could not get that section to work. The main problem was the task sequence. The blog says to use a custom task sequence when in reality, you must use a Standard Client Task Sequence.&amp;nbsp;&lt;/p&gt;&lt;p&gt;The first thing I did was to disable Postinstall and State Restore groups as we will not be joining a domain and the task sequence needs to stop in Postinstall mode. The next thing was to create a new Postinstall group as shown below.&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBpm0RK8gfypCeSNJGVDvcMk8kHW0gPN8A0Uc20MMuLf5jUYBmuKOuaUPON4B2R3fPyYdihyq-un5t1919pgnuKPE2ht3yfbk5mqfRY-V2hQnflFtiOqCnKaRBEr1Tcj2cpgpnd7ZoXKfvb6xjzmdQ5EJfeCbl00sDi8mISlUkWLPY7xDmVg48vAyS/s714/mdt01.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;655&quot; data-original-width=&quot;714&quot; height=&quot;589&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBpm0RK8gfypCeSNJGVDvcMk8kHW0gPN8A0Uc20MMuLf5jUYBmuKOuaUPON4B2R3fPyYdihyq-un5t1919pgnuKPE2ht3yfbk5mqfRY-V2hQnflFtiOqCnKaRBEr1Tcj2cpgpnd7ZoXKfvb6xjzmdQ5EJfeCbl00sDi8mISlUkWLPY7xDmVg48vAyS/w640-h589/mdt01.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;The next thing was to create the CustomSettings_Autopilot.ini as described in the referring blog. The Gather uses the CustomSettings_Autopilot.ini file as described in the blog.&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFtV1b-EURTRQlz4CjydQ1jdmM-5F8BPoDLXBrO867T4UJTnVCf6BtOejnigJa4ytXSJwafzH_5d7Iz4JxRBYdOsF3KDCj70b4NSQ1lGbhNv17N0sssHPREPCFMi-MPkcsBqjHBtJpFDJ9t0XehVYqLBwcwsxAPDplTX3V4IS3ey5uQRblcblJsuFN/s683/mdt02.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;390&quot; data-original-width=&quot;683&quot; height=&quot;366&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFtV1b-EURTRQlz4CjydQ1jdmM-5F8BPoDLXBrO867T4UJTnVCf6BtOejnigJa4ytXSJwafzH_5d7Iz4JxRBYdOsF3KDCj70b4NSQ1lGbhNv17N0sssHPREPCFMi-MPkcsBqjHBtJpFDJ9t0XehVYqLBwcwsxAPDplTX3V4IS3ey5uQRblcblJsuFN/w640-h366/mdt02.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;The Apply Autopilot Profile also uses what is described in the other blog.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;xcopy %SCRIPTROOT%\AutopilotConfigurationFile.json %OSDisk%\Windows\provisioning\AutoPilot\ /c&lt;/li&gt;&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHnCnp-rglQOdv8vEAGy1UaaZqeK-FD7KWVaDmF62MKvMebzxDJdLE6PjIUuAq4saex0pB4RRHKmW_BDtm9XydSHBVey1zoA6YdwGGl2NRvHIrBArLJspf278YnwjqKzKFCFXd4Wbz7xSu2dH0SIhclhClUK-8en_m9BdOm8L1J5Ig_znW5_erQ8Ol/s679/mdt03.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;459&quot; data-original-width=&quot;679&quot; height=&quot;432&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHnCnp-rglQOdv8vEAGy1UaaZqeK-FD7KWVaDmF62MKvMebzxDJdLE6PjIUuAq4saex0pB4RRHKmW_BDtm9XydSHBVey1zoA6YdwGGl2NRvHIrBArLJspf278YnwjqKzKFCFXd4Wbz7xSu2dH0SIhclhClUK-8en_m9BdOm8L1J5Ig_znW5_erQ8Ol/w640-h432/mdt03.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;The next stip is to delete the unattend.xml file as shown below:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiva3I8gKQh5wDn1JaxXEx8G-JuuF7Dp0KeJmLa46LW5oSWFBg-9aj05h11r9zcwel4xm4ZaiZb6npXGPesWcOC2WwnMxm91NLfjiF50oyOgSa02IXgcNzC7V28NvBzrm4NFr1ec-_80lZaZ5ZgLUc86vTAsFvJH7OWvgUQ3Xff-tZxEzvIVvW3bIwu/s688/mdt04.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;490&quot; data-original-width=&quot;688&quot; height=&quot;456&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiva3I8gKQh5wDn1JaxXEx8G-JuuF7Dp0KeJmLa46LW5oSWFBg-9aj05h11r9zcwel4xm4ZaiZb6npXGPesWcOC2WwnMxm91NLfjiF50oyOgSa02IXgcNzC7V28NvBzrm4NFr1ec-_80lZaZ5ZgLUc86vTAsFvJH7OWvgUQ3Xff-tZxEzvIVvW3bIwu/w640-h456/mdt04.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;The next task places a file named autopilot.txt in the root directory of the c: drive. This is a flag to run the Intune package that will delete all MDT associated files and registry keys to terminate the MDT build.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPHd6VBwq_TyEMHdvxyo4HJapGzgrdsT1cjeJjSgbNKdnMAP2qqjMFYYTeHYD3ERc9eakE59EV4sBDpk-IZdG7Qa0tfw3I7erQpBQt5kHppOaiM4zzn3H5tud13d3PloGkl8ct1SUOKweyRQjrHtbfO9Y1d1oBv6UbzsGvrYW81R7iysSw_Er2HoZ5/s678/mdt06.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;437&quot; data-original-width=&quot;678&quot; height=&quot;412&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPHd6VBwq_TyEMHdvxyo4HJapGzgrdsT1cjeJjSgbNKdnMAP2qqjMFYYTeHYD3ERc9eakE59EV4sBDpk-IZdG7Qa0tfw3I7erQpBQt5kHppOaiM4zzn3H5tud13d3PloGkl8ct1SUOKweyRQjrHtbfO9Y1d1oBv6UbzsGvrYW81R7iysSw_Er2HoZ5/w640-h412/mdt06.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;The next task will delete most of the MDT files on the system.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhO9HcinqCCIHGwvPWg7YquXu58Q7a44w7hMP7ph58hCai-dNngqpauf2ZUFJVcIOf1ikMog6AFzLRUAGcLSl1gIQ2KEGGb9G_Jw9kSzHGBPp-Gmo8Ia0eEb12KzR5go5g7I6wZcjRb0uLallV-E7sM1sr3oY2avqEIuG_GGq1onfUlAxGJQcANNot1/s681/mdt07.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;457&quot; data-original-width=&quot;681&quot; height=&quot;430&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhO9HcinqCCIHGwvPWg7YquXu58Q7a44w7hMP7ph58hCai-dNngqpauf2ZUFJVcIOf1ikMog6AFzLRUAGcLSl1gIQ2KEGGb9G_Jw9kSzHGBPp-Gmo8Ia0eEb12KzR5go5g7I6wZcjRb0uLallV-E7sM1sr3oY2avqEIuG_GGq1onfUlAxGJQcANNot1/w640-h430/mdt07.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Finally, the Restart task reboots the system at which point it will come up to the Autopilot user signon page.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;As far as the SetupCompleteAutopilot.cmd file, here is what I have inside it. I changed some of the script to use environmental variables and I added the deletion of the c:\autopilot.txt file and the creation of the same file under c:\windows\temp to signify the script executed and the system has been cleaned up so the Intune package registers the execution as a success.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;@echo off&lt;/div&gt;&lt;div&gt;&lt;div&gt;:: // ***************************************************************************&lt;/div&gt;&lt;div&gt;:: //&lt;/div&gt;&lt;div&gt;:: //&lt;/div&gt;&lt;div&gt;:: // File:&amp;nbsp; &amp;nbsp; &amp;nbsp; SetupComplete.cmd&lt;/div&gt;&lt;div&gt;:: //&lt;/div&gt;&lt;div&gt;:: // Version:&amp;nbsp; &amp;nbsp;1.0&lt;/div&gt;&lt;div&gt;:: //&lt;/div&gt;&lt;div&gt;:: // Purpose:&amp;nbsp; &amp;nbsp;Cleanup after MDT Autopilot deployment&lt;/div&gt;&lt;div&gt;:: //&lt;/div&gt;&lt;div&gt;:: // ***************************************************************************&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;:: Copy to windows setup folder for application verification purposes in Intune&lt;/div&gt;&lt;div&gt;copy /V /Y \\prodfs01\All\ProdApps\Waller\SetupComplete\SetupCompleteAutopilot.cmd %WINDIR%\Setup\SetupCompleteAutopilot.cmd&lt;/div&gt;&lt;div&gt;:: Workaround for incorrectly-registered TS environment&lt;/div&gt;&lt;div&gt;reg delete HKCR\Microsoft.SMS.TSEnvironment /f &amp;gt; nul 2&amp;gt;&amp;amp;1&lt;/div&gt;&lt;div&gt;rmdir /Q /S %OSDisk%\MININT&amp;nbsp;&lt;/div&gt;&lt;div&gt;rmdir /Q /S %OSDisk%\_SMSTaskSequence&lt;/div&gt;&lt;div&gt;del /Q %OSDisk%\LTIBootstrap.vbs&lt;/div&gt;&lt;div&gt;del /Q %OSDisk%\autopilot.txt&lt;/div&gt;&lt;div&gt;echo Test &amp;gt; %WINDIR%\Temp\autopilot.txt&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In Intune, I created the app called MDT Cleanup. Here is the program page. I used a dummy delete.cmd file as that part is not needed.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9QlJsVhed71q-oYZ9zRgqkMb52QDnF2jmPDmpq5ftQANpGtdI-memtWsukLA8Ni5aBeYeNdNZqqmyDu5qexi5zrdsqSQPUpYoNiHhJTV7MFf_u6hW2l_fOORbr_ROxP4zuWy9tdZ9OoKC0y82lpaSTo9vny01N2aC2gmIfPbqwXIm6N-LFfRHKhXj/s782/intune01.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;595&quot; data-original-width=&quot;782&quot; height=&quot;486&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9QlJsVhed71q-oYZ9zRgqkMb52QDnF2jmPDmpq5ftQANpGtdI-memtWsukLA8Ni5aBeYeNdNZqqmyDu5qexi5zrdsqSQPUpYoNiHhJTV7MFf_u6hW2l_fOORbr_ROxP4zuWy9tdZ9OoKC0y82lpaSTo9vny01N2aC2gmIfPbqwXIm6N-LFfRHKhXj/w640-h486/intune01.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_VWW0g-VotkH5SxFHPbIAwXaauT6u8gnJDkpRCzeyFFaNUcibKHCUtJxEoz-dBQt4AJ1zuX4XYXiQogmkxS_ULCItEB4IbmRYO88nQ8LL8sKgd-PaP4tdKNDPIlEPOWSpLdDiouNpN5dDr3BJEg7jI6IkUCEkuA_WSd2GPbp-JMWXoEe0PyRhucMx/s1262/intune03.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;591&quot; data-original-width=&quot;1262&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_VWW0g-VotkH5SxFHPbIAwXaauT6u8gnJDkpRCzeyFFaNUcibKHCUtJxEoz-dBQt4AJ1zuX4XYXiQogmkxS_ULCItEB4IbmRYO88nQ8LL8sKgd-PaP4tdKNDPIlEPOWSpLdDiouNpN5dDr3BJEg7jI6IkUCEkuA_WSd2GPbp-JMWXoEe0PyRhucMx/w640-h300/intune03.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgssR_Vxr4AI8OCTd6_UKmFgBIqiLV2Xhabz5-dfRV5SpX7OBXqMmSwZrKnU122EO2SI2-Jm2QxvxlB8tULHVreQIDeSiPxEfRrEe9WFCO3OgugJvvOa154X1iFuZUo57647lxWYNDYdDxMXQpbPjyiYr7C8bB3OABxErRMnWDA9jib0KcJ99-qmPBG/s1220/intune04.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;367&quot; data-original-width=&quot;1220&quot; height=&quot;192&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgssR_Vxr4AI8OCTd6_UKmFgBIqiLV2Xhabz5-dfRV5SpX7OBXqMmSwZrKnU122EO2SI2-Jm2QxvxlB8tULHVreQIDeSiPxEfRrEe9WFCO3OgugJvvOa154X1iFuZUo57647lxWYNDYdDxMXQpbPjyiYr7C8bB3OABxErRMnWDA9jib0KcJ99-qmPBG/w640-h192/intune04.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;That is all that is to the Intune package. Now the system will build a bare-bones OS and then transfer the rest of the build process to Intune.&amp;nbsp;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mickitblog.blogspot.com/feeds/6273196915241560259/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mickitblog.blogspot.com/2022/09/imaging-using-mdt-with-autopilot.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/6273196915241560259'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/6273196915241560259'/><link rel='alternate' type='text/html' href='http://mickitblog.blogspot.com/2022/09/imaging-using-mdt-with-autopilot.html' title='Imaging using MDT with Autopilot'/><author><name>Mick Pletcher</name><uri>http://www.blogger.com/profile/09597651323688418212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1GjVWF_81hun8PvhRSvbXBJHCYVoX_UJZbi7SbHgHEXQJ8An20_JaeeW8tAwDbyQAW4jpEb0H_eL4cOgwfX3Jx4hMBbD1vdmfjsk8w0c6TNCBnkvgxUMVn54cUbe3yQ/s151/396426_10151292562288888_1032319935_n.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBpm0RK8gfypCeSNJGVDvcMk8kHW0gPN8A0Uc20MMuLf5jUYBmuKOuaUPON4B2R3fPyYdihyq-un5t1919pgnuKPE2ht3yfbk5mqfRY-V2hQnflFtiOqCnKaRBEr1Tcj2cpgpnd7ZoXKfvb6xjzmdQ5EJfeCbl00sDi8mISlUkWLPY7xDmVg48vAyS/s72-w640-h589-c/mdt01.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159186316497589396.post-3597142704443943220</id><published>2022-08-03T12:41:00.002-05:00</published><updated>2022-08-03T12:41:33.381-05:00</updated><title type='text'>Find Programs and Features Uninstall Registry Keys with PowerShell</title><content type='html'>&lt;p&gt;&amp;nbsp;I am working on a new package to upgrade one of the applications. This time, it requires I uninstall the old app first before installing the new version. There are two different versions, so I needed to retrieve the uninstall strings for both. That is when I decided to write this script that will scan the registry for the application and list the key values as shown below. It scans both the x86 and x64 Uninstall registry entries. The script was also written to be able to scan for wildcard values if there is more than one entry you are looking for.&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtUkztk9fSDQKCd5Jy3hZ5hGkeDVm-MBWWPUHXQ1tX29d62TMhM_3y9017o_S2D3C9s--zLFX3zO3047P7K8ZWG6MaqxixeC4MmdowtrPD3ezJ1ZtzMEWn9CYRiCTlUanyYGGCIs_9luHamUEVTyOPyKEkjOnpYgMLcfIBPNe5Nb2arUh3-Je2v_d_/s965/Capture.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;479&quot; data-original-width=&quot;965&quot; height=&quot;318&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtUkztk9fSDQKCd5Jy3hZ5hGkeDVm-MBWWPUHXQ1tX29d62TMhM_3y9017o_S2D3C9s--zLFX3zO3047P7K8ZWG6MaqxixeC4MmdowtrPD3ezJ1ZtzMEWn9CYRiCTlUanyYGGCIs_9luHamUEVTyOPyKEkjOnpYgMLcfIBPNe5Nb2arUh3-Je2v_d_/w640-h318/Capture.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;You can download the script from my &lt;a href=&quot;https://github.com/MicksITBlogs/PowerShell/blob/master/FindRegistryUninstall.ps1&quot; target=&quot;_blank&quot;&gt;GitHub&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz1xGp9q86dTZmBT6Kgf4lTiCRnpB-883UDue4w0nS25otuiDMzqANNGCcUIMXUyHVEm0-djravLr2rh4_OiSiUlcv2KthEqRgIz1dikIsp_zoYcmSlQyrulsFHeMkbNa6Gd9iCnqBnO-K/s320/codebg.gif); background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; background: #f0f0f0; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; overflow-wrap: normal; word-wrap: normal;&quot;&gt; &amp;lt;#  
      .SYNOPSIS  
           Uninstall Finder  
        
      .DESCRIPTION  
           This script will retrieve the x86 and x64 uninstall registry key(s) for a specific applicaton. This is very helpful for Configuration Manager admins when needing to create packages, especially uninstall packages.  
        
      .PARAMETER ApplicationName  
           Name of the application as it appears in Add/Remove Programs  
        
      .PARAMETER Like  
           Select this if using a partial name or wanting multiple listings to appear  
        
      .NOTES  
           ===========================================================================  
           Created with:     SAPIEN Technologies, Inc., PowerShell Studio 2022 v5.8.209  
           Created on:       8/3/2022 11:44 AM  
           Created by:       Mick Pletcher  
           Filename:         FindRegistryUninstall.ps1  
           ===========================================================================  
 #&amp;gt;  
 [CmdletBinding()]  
 param  
 (  
      [ValidateNotNullOrEmpty()]  
      [string]$ApplicationName,  
      [switch]$Like  
 )  
   
 If ($Like.IsPresent) {  
      Get-ChildItem -Path REGISTRY::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall, REGISTRY::HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall | Get-ItemProperty | Where-Object { $_.DisplayName -like (&#39;*&#39; + $ApplicationName + &#39;*&#39;) }  
 } else {  
      Get-ChildItem -Path REGISTRY::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall, REGISTRY::HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall | Get-ItemProperty | Where-Object { $_.DisplayName -eq $ApplicationName }  
 }  
   
&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://mickitblog.blogspot.com/feeds/3597142704443943220/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mickitblog.blogspot.com/2022/08/find-programs-and-features-uninstall.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/3597142704443943220'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/3597142704443943220'/><link rel='alternate' type='text/html' href='http://mickitblog.blogspot.com/2022/08/find-programs-and-features-uninstall.html' title='Find Programs and Features Uninstall Registry Keys with PowerShell'/><author><name>Mick Pletcher</name><uri>http://www.blogger.com/profile/09597651323688418212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1GjVWF_81hun8PvhRSvbXBJHCYVoX_UJZbi7SbHgHEXQJ8An20_JaeeW8tAwDbyQAW4jpEb0H_eL4cOgwfX3Jx4hMBbD1vdmfjsk8w0c6TNCBnkvgxUMVn54cUbe3yQ/s151/396426_10151292562288888_1032319935_n.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtUkztk9fSDQKCd5Jy3hZ5hGkeDVm-MBWWPUHXQ1tX29d62TMhM_3y9017o_S2D3C9s--zLFX3zO3047P7K8ZWG6MaqxixeC4MmdowtrPD3ezJ1ZtzMEWn9CYRiCTlUanyYGGCIs_9luHamUEVTyOPyKEkjOnpYgMLcfIBPNe5Nb2arUh3-Je2v_d_/s72-w640-h318-c/Capture.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159186316497589396.post-7086546592266262689</id><published>2022-08-02T14:10:00.004-05:00</published><updated>2022-08-02T14:10:55.269-05:00</updated><title type='text'>Configuring Wake-On-LAN for Dell Systems</title><content type='html'>The firm I am at has recently upgraded all systems to the newest model Dells. In doing so, some of the settings for configuring WOL have changed in the BIOS. I have rewritten this script to cover all changes to the OS, BIOS, and NIC. The script uses the DellSMBios PowerShell module to configure the BIOS settings. Thanks to these sites for pertinent information that helped with writing this tool:&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;a href=&quot;https://www.dell.com/support/kbdoc/en-us/000175283/how-to-setup-wake-on-lan-wol-on-your-dell-system&quot; target=&quot;_blank&quot;&gt;How to setup Wake on LAN on your Dell System&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://www.isumsoft.com/windows-10/turn-on-off-fast-startup-in-windows-10.html&quot; target=&quot;_blank&quot;&gt;How to Turn on/off Fast Startup in Windows 10&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://docs.microsoft.com/en-us/troubleshoot/windows-client/networking/power-management-on-network-adapter&quot; target=&quot;_blank&quot;&gt;Information about power management setting on a network adapter&lt;/a&gt;&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;And yes, I do realize I could have consolidated some of the code into a function that would have worked repetitively against each setting.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The things that must be done to get this to work are:&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;BIOS: Disable CStatesCtrl&lt;/li&gt;&lt;li&gt;BIOS: Enable Wake-On-LAN either LanWlan or LanOnly&lt;/li&gt;&lt;li&gt;BIOS: Disable DeepSleepCtrl&lt;/li&gt;&lt;li&gt;BIOS: Disable BlockS3&lt;/li&gt;&lt;li&gt;NIC: Disable Energy Efficient Ethernet&lt;/li&gt;&lt;li&gt;NIC: Turn on Wake on Magic Packet&lt;/li&gt;&lt;li&gt;OS: Turn off Hibernation&lt;/li&gt;&lt;li&gt;OS: Enable&amp;nbsp;Allow the computer to turn off this device is configured&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;This is a screenshot of the script after it successfully ran against a Dell 7090 machine.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwE8MCra9L2RZPs0FL9jWPS2hmJDtpY0dpHeAam3d2TuqERnbPc1ONVacQ_mU6MSdQumfKqAyaUOkD1u1MZTF-XvvJMb8j_gE97oGDFVTPnWWpVNqm6rCNK2w94np-N-J_g8PtSrnnod4buH2gKDao8jLey_2XqEnW_pY3RmV0TsU6wtM3SLrvo3ZO/s299/Capture.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;183&quot; data-original-width=&quot;299&quot; height=&quot;245&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwE8MCra9L2RZPs0FL9jWPS2hmJDtpY0dpHeAam3d2TuqERnbPc1ONVacQ_mU6MSdQumfKqAyaUOkD1u1MZTF-XvvJMb8j_gE97oGDFVTPnWWpVNqm6rCNK2w94np-N-J_g8PtSrnnod4buH2gKDao8jLey_2XqEnW_pY3RmV0TsU6wtM3SLrvo3ZO/w400-h245/Capture.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Here is the script that I wrote and works in our environment on Dell Optiplexes and Latitudes.&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can download it from my &lt;a href=&quot;https://github.com/MicksITBlogs/PowerShell/blob/master/WOL.ps1&quot; target=&quot;_blank&quot;&gt;GitHub site&lt;/a&gt;.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;

&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz1xGp9q86dTZmBT6Kgf4lTiCRnpB-883UDue4w0nS25otuiDMzqANNGCcUIMXUyHVEm0-djravLr2rh4_OiSiUlcv2KthEqRgIz1dikIsp_zoYcmSlQyrulsFHeMkbNa6Gd9iCnqBnO-K/s320/codebg.gif); background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; background: #f0f0f0; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; overflow-wrap: normal; word-wrap: normal;&quot;&gt; &amp;lt;#  
      .SYNOPSIS  
           Wake-On-LAN  
        
      .DESCRIPTION  
           A description of the file.  
        
      .PARAMETER ConsoleTitle  
           Title for PowerShell console  
        
      .PARAMETER BIOSPassword  
           A description of the BIOSPassword parameter.  
        
      .NOTES  
           ===========================================================================  
           Created with:      SAPIEN Technologies, Inc., PowerShell Studio 2022 v5.8.209  
           Created on:       8/1/2022 8:16 AM  
           Created by:       Mick Pletcher  
           Filename:          WOL.ps1  
           ===========================================================================  
 #&amp;gt;  
 param  
 (  
      [ValidateNotNullOrEmpty()]  
      [string]$ConsoleTitle,  
      [string]$BIOSPassword  
 )  
   
 function Set-BIOS {  
 &amp;lt;#  
      .SYNOPSIS  
           Configure WOL in BIOS  
        
      .DESCRIPTION  
           Configure WOL in BIOS  
        
 #&amp;gt;  
        
      [CmdletBinding()]  
      param ()  
        
      #Import Dell BIOS Provider PowerShell Module  
      Try {  
           Import-Module -Name DellBIOSProvider  
      }  
      catch {  
           Find-Module -Name DellBIOSProvider | Install-Module -Force  
           Import-Module -Name DellBIOSProvider  
      }  
      #Set Wake-On-LAN to LanOnly  
      $BIOSItem = &quot;PowerManagement\WakeOnLan&quot;  
      $NewValue = &quot;LanWlan&quot;  
      #Check if LanWlan is available  
      If ($NewValue -notin (&quot;DellSmBios:\&quot; + $BIOSItem).PossibleValues) {  
           $NewValue = &quot;LanOnly&quot;  
      }  
      If (Get-Item -Path (&quot;DellSmBios:\&quot; + $BIOSItem) -ErrorAction SilentlyContinue) {  
           Write-Host (&quot;BIOS&quot; + [char]32 + $BIOSItem.split(&#39;\&#39;)[1] + &quot;:&quot; + [char]32) -NoNewline  
           If ((Get-Item -Path (&quot;DellSmBios:\&quot; + $BIOSItem)).CurrentValue -ne $NewValue) {  
                If ($BIOSPassword) {  
                     Set-Item -Path (&quot;DellSmBios:\&quot; + $BIOSItem) -Value $NewValue -Force -Password $BIOSPassword  
                } else {  
                     Set-Item -Path (&quot;DellSmBios:\&quot; + $BIOSItem) -Value $NewValue -Force  
                }  
                If ((Get-Item -Path (&quot;DellSmBios:\&quot; + $BIOSItem)).CurrentValue -eq $NewValue) {  
                     Write-Host $NewValue -ForegroundColor Yellow  
                }  
                else {  
                     Write-Host (Get-Item -Path (&quot;DellSmBios:\&quot; + $BIOSItem)).CurrentValue -ForegroundColor Red  
                }  
           }  
           else {  
                Write-Host $NewValue -ForegroundColor Yellow  
           }  
      }  
        
      #Disable CState Control  
      $BIOSItem = &quot;Performance\CStatesCtrl&quot;  
      $NewValue = &quot;Disabled&quot;  
      #Test if CState exists  
      If (Get-Item -Path (&quot;DellSmBios:\&quot; + $BIOSItem) -ErrorAction SilentlyContinue) {  
           Write-Host (&quot;BIOS&quot; + [char]32 + $BIOSItem.split(&#39;\&#39;)[1] + &quot;:&quot; + [char]32) -NoNewline  
           If ((Get-Item -Path (&quot;DellSmBios:\&quot; + $BIOSItem)).CurrentValue -ne $NewValue) {  
                If ($BIOSPassword) {  
                     Set-Item -Path (&quot;DellSmBios:\&quot; + $BIOSItem) -Value $NewValue -Force -Password $BIOSPassword  
                }  
                else {  
                     Set-Item -Path (&quot;DellSmBios:\&quot; + $BIOSItem) -Value $NewValue -Force  
                }  
                If ((Get-Item -Path (&quot;DellSmBios:\&quot; + $BIOSItem)).CurrentValue -eq $NewValue) {  
                     Write-Host $NewValue -ForegroundColor Yellow  
                }  
                else {  
                     Write-Host (Get-Item -Path (&quot;DellSmBios:\&quot; + $BIOSItem)).CurrentValue -ForegroundColor Red  
                }  
           }  
           else {  
                Write-Host $NewValue -ForegroundColor Yellow  
           }  
      }  
        
      #Disable Deep Sleep  
      $BIOSItem = &quot;PowerManagement\DeepSleepCtrl&quot;  
      $NewValue = &quot;Disabled&quot;  
      #Test if Deep Sleep exists  
      If (Get-Item -Path (&quot;DellSmBios:\&quot; + $BIOSItem) -ErrorAction SilentlyContinue) {  
           Write-Host (&quot;BIOS&quot; + [char]32 + $BIOSItem.split(&#39;\&#39;)[1] + &quot;:&quot; + [char]32) -NoNewline  
           If ((Get-Item -Path (&quot;DellSmBios:\&quot; + $BIOSItem)).CurrentValue -ne $NewValue) {  
                If ($BIOSPassword) {  
                     Set-Item -Path (&quot;DellSmBios:\&quot; + $BIOSItem) -Value $NewValue -Force -Password $BIOSPassword  
                }  
                else {  
                     Set-Item -Path (&quot;DellSmBios:\&quot; + $BIOSItem) -Value $NewValue -Force  
                }  
                If ((Get-Item -Path (&quot;DellSmBios:\&quot; + $BIOSItem)).CurrentValue -eq $NewValue) {  
                     Write-Host $NewValue -ForegroundColor Yellow  
                }  
                else {  
                     Write-Host (Get-Item -Path (&quot;DellSmBios:\&quot; + $BIOSItem)).CurrentValue -ForegroundColor Red  
                }  
           }  
           else {  
                Write-Host $NewValue -ForegroundColor Yellow  
           }  
      }  
        
      #Disable Block S3  
      $BIOSItem = &quot;PowerManagement\BlockS3&quot;  
      $NewValue = &quot;Disabled&quot;  
      #Test if Block S3 exists  
      If (Get-Item -Path (&quot;DellSmBios:\&quot; + $BIOSItem) -ErrorAction SilentlyContinue) {  
           Write-Host (&quot;BIOS&quot; + [char]32 + $BIOSItem.split(&#39;\&#39;)[1] + &quot;:&quot; + [char]32) -NoNewline  
           If ((Get-Item -Path (&quot;DellSmBios:\&quot; + $BIOSItem)).CurrentValue -ne $NewValue) {  
                If ($BIOSPassword) {  
                     Set-Item -Path (&quot;DellSmBios:\&quot; + $BIOSItem) -Value $NewValue -Force -Password $BIOSPassword  
                }  
                else {  
                     Set-Item -Path (&quot;DellSmBios:\&quot; + $BIOSItem) -Value $NewValue -Force  
                }  
                If ((Get-Item -Path (&quot;DellSmBios:\&quot; + $BIOSItem)).CurrentValue -eq $NewValue) {  
                     Write-Host $NewValue -ForegroundColor Yellow  
                }  
                else {  
                     Write-Host (Get-Item -Path (&quot;DellSmBios:\&quot; + $BIOSItem)).CurrentValue -ForegroundColor Red  
                }  
           }  
           else {  
                Write-Host $NewValue -ForegroundColor Yellow  
           }  
      }  
        
      #Disable C States  
      $BIOSItem = &quot;PowerManagement\CStatesCtrl&quot;  
      $NewValue = &quot;Disabled&quot;  
      #Test if CStatesCtrl exists  
      If (Get-Item -Path (&quot;DellSmBios:\&quot; + $BIOSItem) -ErrorAction SilentlyContinue) {  
           Write-Host (&quot;BIOS&quot; + [char]32 + $BIOSItem.split(&#39;\&#39;)[1] + &quot;:&quot; + [char]32) -NoNewline  
           If ((Get-Item -Path (&quot;DellSmBios:\&quot; + $BIOSItem)).CurrentValue -ne $NewValue) {  
                If ($BIOSPassword) {  
                     Set-Item -Path (&quot;DellSmBios:\&quot; + $BIOSItem) -Value $NewValue -Force -Password $BIOSPassword  
                }  
                else {  
                     Set-Item -Path (&quot;DellSmBios:\&quot; + $BIOSItem) -Value $NewValue -Force  
                }  
                If ((Get-Item -Path (&quot;DellSmBios:\&quot; + $BIOSItem)).CurrentValue -eq $NewValue) {  
                     Write-Host $NewValue -ForegroundColor Yellow  
                }  
                else {  
                     Write-Host (Get-Item -Path (&quot;DellSmBios:\&quot; + $BIOSItem)).CurrentValue -ForegroundColor Red  
                }  
           }  
           else {  
                Write-Host $NewValue -ForegroundColor Yellow  
           }  
      }  
 }  
   
 Function Set-AdvancedNIC {  
        #Get the Ethernet NIC  
      $NIC = Get-NetAdapter | Where-Object {($_.PhysicalMediaType -eq &#39;802.3&#39;) -and ($_.Status -eq &#39;Up&#39;)}  
        #Disable Energy Efficient Ethernet setting so NIC does not go to sleep  
   #Two variants of Energy Efficient Exist on different Dell models  
      #Check if Energy-Efficient Ethernet Exists  
      If (Get-NetAdapterAdvancedProperty -Name $NIC.Name -DisplayName &#39;Energy-Efficient Ethernet&#39; -ErrorAction SilentlyContinue) {  
           Write-Host &#39;NIC Energy-Efficient Ethernet: &#39; -NoNewline  
           Set-NetAdapterAdvancedProperty -Name $NIC.Name -DisplayName &#39;Energy-Efficient Ethernet&#39; -DisplayValue &#39;Disabled&#39;  
           If ((Get-NetAdapterAdvancedProperty -Name $NIC.Name -DisplayName &#39;Energy-Efficient Ethernet&#39;).DisplayValue -eq &#39;Disabled&#39;) {  
                Write-Host &#39;Disabled&#39; -ForegroundColor Yellow  
           }  
           else {  
                Write-Host &#39;Enabled&#39; -ForegroundColor Red  
           }  
      }  
      #Check if Energy Efficient Ethernet Exists  
      If (Get-NetAdapterAdvancedProperty -Name $NIC.Name -DisplayName &#39;Energy Efficient Ethernet&#39; -ErrorAction SilentlyContinue) {  
           Write-Host &#39;NIC Energy Efficient Ethernet: &#39; -NoNewline  
           Set-NetAdapterAdvancedProperty -Name $NIC.Name -DisplayName &#39;Energy Efficient Ethernet&#39; -DisplayValue &#39;Off&#39;  
           If ((Get-NetAdapterAdvancedProperty -Name $NIC.Name -DisplayName &#39;Energy Efficient Ethernet&#39;).DisplayValue -eq &#39;Off&#39;) {  
                Write-Host &#39;Off&#39; -ForegroundColor Yellow  
           }  
           else {  
                Write-Host &#39;On&#39; -ForegroundColor Red  
           }  
      }  
      #Turn on Wake on Magic Packet  
        #Check if Wake on Magic Packet Exists  
      If (Get-NetAdapterAdvancedProperty -Name $NIC.Name -DisplayName &#39;Wake on Magic Packet&#39; -ErrorAction SilentlyContinue) {  
           Write-Host &#39;NIC Wake on Magic Packet: &#39; -NoNewline  
           Set-NetAdapterAdvancedProperty -Name $NIC.Name -DisplayName &#39;Wake on Magic Packet&#39; -RegistryKeyword &#39;*WakeOnMagicPacket&#39; -RegistryValue 1  
           If ((Get-NetAdapterAdvancedProperty -Name $NIC.Name -DisplayName &#39;Wake on Magic Packet&#39;).DisplayValue -eq &#39;Enabled&#39;) {  
                Write-Host &#39;Enabled&#39; -ForegroundColor Yellow  
           }  
           else {  
                Write-Host &#39;Disabled&#39; -ForegroundColor Red  
           }  
      }  
      #Shutdown WakeOnLAN  
      If (Get-NetAdapterAdvancedProperty -Name $NIC.Name -DisplayName &#39;Shutdown Wake-On-Lan&#39; -ErrorAction SilentlyContinue) {  
           Write-Host &#39;NIC Shutdown Wake-On-Lan: &#39; -NoNewline  
           Set-NetAdapterAdvancedProperty -Name $NIC.Name -DisplayName &#39;Shutdown Wake-On-Lan&#39; -DisplayValue &#39;Enabled&#39;  
           If ((Get-NetAdapterAdvancedProperty -Name $NIC.Name -DisplayName &#39;Shutdown Wake-On-Lan&#39;).DisplayValue -eq &#39;Enabled&#39;) {  
                Write-Host &#39;Enabled&#39; -ForegroundColor Yellow  
           }  
           else {  
                Write-Host &#39;Disabled&#39; -ForegroundColor Red  
           }  
      }  
 }  
   
 function Set-PowerManagement {  
 &amp;lt;#  
      .SYNOPSIS  
           Enable Power Management  
        
      .DESCRIPTION  
           A detailed description of the Set-PowerManagement function.  
        
      .EXAMPLE  
                     PS C:\&amp;gt; Set-PowerManagement  
        
      .NOTES  
           Additional information about the function.  
 #&amp;gt;  
        
      [CmdletBinding()]  
      param ()  
        
      #Turn off Hibernation  
   Write-Host (&quot;OS Hiberboot:&quot; + [char]32) -NoNewline  
   If ((Get-ItemProperty -Path REGISTRY::&quot;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Power&quot;).HiberbootEnabled -ne 0) {  
     Set-ItemProperty -Path REGISTRY::&quot;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Power&quot; -Name HiberbootEnabled -Value 0 -Force  
   }  
   If ((Get-ItemProperty -Path REGISTRY::&quot;HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Power&quot;).HiberbootEnabled -eq 0) {  
     Write-Host &quot;Disabled&quot; -ForegroundColor Yellow  
   } else {  
     Write-Host &quot;Enabled&quot; -ForegroundColor Red  
   }  
   
      #0 = Option 1 &amp;amp; 2 checked  
   #10 = Option 1 checked, 2 &amp;amp; 3 cleared  
   #24 = Option 1 unchecked  
   #256 = Option 1, 2, &amp;amp; 3 all checked  
   #264 = Option 2 &amp;amp; 3 Checked  
   #272 = Option 1 checked  
   #280 = Option 2 &amp;amp; 3 checked  
   $PNPValue = 256  
      $Adapter = Get-NetAdapter | Where-Object { ($_.Status -eq &#39;Up&#39;) -and ($_.PhysicalMediaType -eq &#39;802.3&#39;) }  
      $KeyPath = &#39;HKLM:\SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002bE10318}\&#39;  
      foreach ($Entry in (Get-ChildItem $KeyPath -ErrorAction SilentlyContinue).Name) {  
           If ((Get-ItemProperty REGISTRY::$Entry).DriverDesc -eq $Adapter.InterfaceDescription) {   
                $Value = (Get-ItemProperty REGISTRY::$Entry).PnPCapabilities  
                If ($Value -ne $PnPValue) {  
                     Set-ItemProperty -Path REGISTRY::$Entry -Name PnPCapabilities -Value $PnPValue -Force  
                     Disable-PnpDevice -InstanceId $Adapter.PnPDeviceID -Confirm:$false  
                     Enable-PnpDevice -InstanceId $Adapter.PnPDeviceID -Confirm:$false  
                     $Value = (Get-ItemProperty REGISTRY::$Entry).PnPCapabilities }  
                If ($Value -eq $PnPValue) {  
                     Write-Host &#39;Allow the computer to turn off this device is configured&#39; -ForegroundColor Yellow  
                } else {   
                     Write-Host &#39;Allow the computer to turn off this device Failed&#39; -ForegroundColor Red  
                     Exit 1  
                }  
           }  
      }  
 }  
   
   
 #Set Console Title  
 $host.ui.RawUI.WindowTitle = $ConsoleTitle  
 Set-BIOS  
 Set-AdvancedNIC  
 Set-PowerManagement  
   
&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://mickitblog.blogspot.com/feeds/7086546592266262689/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mickitblog.blogspot.com/2022/08/configuring-wake-on-lan-for-dell-systems.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/7086546592266262689'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/7086546592266262689'/><link rel='alternate' type='text/html' href='http://mickitblog.blogspot.com/2022/08/configuring-wake-on-lan-for-dell-systems.html' title='Configuring Wake-On-LAN for Dell Systems'/><author><name>Mick Pletcher</name><uri>http://www.blogger.com/profile/09597651323688418212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1GjVWF_81hun8PvhRSvbXBJHCYVoX_UJZbi7SbHgHEXQJ8An20_JaeeW8tAwDbyQAW4jpEb0H_eL4cOgwfX3Jx4hMBbD1vdmfjsk8w0c6TNCBnkvgxUMVn54cUbe3yQ/s151/396426_10151292562288888_1032319935_n.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwE8MCra9L2RZPs0FL9jWPS2hmJDtpY0dpHeAam3d2TuqERnbPc1ONVacQ_mU6MSdQumfKqAyaUOkD1u1MZTF-XvvJMb8j_gE97oGDFVTPnWWpVNqm6rCNK2w94np-N-J_g8PtSrnnod4buH2gKDao8jLey_2XqEnW_pY3RmV0TsU6wtM3SLrvo3ZO/s72-w400-h245-c/Capture.JPG" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159186316497589396.post-640834772518313468</id><published>2022-07-28T13:50:00.001-05:00</published><updated>2022-07-28T13:50:38.038-05:00</updated><title type='text'>MECM System Cleanup</title><content type='html'>&lt;p&gt;Recently, we started a cleanup of AD. Once the cleanup was completed, I wanted ConfigMgr cleaned up right away too. It is set to clean up old items, but it was not quick enough for me so I wrote the following tool that will query the All Systems collection via SQL and then reads the attributes in AD to see if the system is disabled. It will delete each disabled system from ConfigMgr at the end. Below is an example of it displaying a list of machines, to clean up, the count, and where it is deleting them.&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh41ymtXRdPehGXO7oTlZvAOWd1G5ZtGhpoxH6-Ulc-qsoc97yzcPLDb16br9i0hOCJUALKJhiZnRVisj5mNX9YGvQew9RjyUXwIO0vR5W1SjF8nkqhhamcmkb8GjKH01RYllhRtrb9EGqTb5GoEZ7fWhanmUzlB1XA65YcShwd65lWOTMgpK4mW-ac/s640/Capture.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;189&quot; data-original-width=&quot;640&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh41ymtXRdPehGXO7oTlZvAOWd1G5ZtGhpoxH6-Ulc-qsoc97yzcPLDb16br9i0hOCJUALKJhiZnRVisj5mNX9YGvQew9RjyUXwIO0vR5W1SjF8nkqhhamcmkb8GjKH01RYllhRtrb9EGqTb5GoEZ7fWhanmUzlB1XA65YcShwd65lWOTMgpK4mW-ac/w640-h190/Capture.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Before executing this script in your environment, I highly recommend commenting out the Remove-CMDevice cmdlet and verifying it is deleting the correct systems from ConfigMgr.&amp;nbsp;&lt;/p&gt;&lt;p&gt;You can download the script from my &lt;a href=&quot;https://github.com/MicksITBlogs/PowerShell/blob/fd20ac877153322e65465d7ca082e6b8ea352b57/MECMADCleanup.ps1&quot; target=&quot;_blank&quot;&gt;GitHub site&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz1xGp9q86dTZmBT6Kgf4lTiCRnpB-883UDue4w0nS25otuiDMzqANNGCcUIMXUyHVEm0-djravLr2rh4_OiSiUlcv2KthEqRgIz1dikIsp_zoYcmSlQyrulsFHeMkbNa6Gd9iCnqBnO-K/s320/codebg.gif); background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; background: rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; overflow-wrap: normal; word-wrap: normal;&quot;&gt; &amp;lt;#  
      .SYNOPSIS  
           ConfigMgr Cleanup  
        
      .DESCRIPTION  
           This script will compare the All Systems list in ConfigMgr to systems in AD and delete systems from ConfigMgr that are disabled in AD. It will also report a list of systems that are greater than 30 days old since the last activity in AD.  
        
      .PARAMETER SQLServer  
           ConfigMgr SQL Server
        
      .PARAMETER SQLDatabase  
           Name of the ConfigMgr SQL Database
        
      .PARAMETER PSHCfgMgrModule  
           Path to ConfigurationManager.psd1 module  
        
      .PARAMETER Sitecode  
           Three character ConfigMgr site code  
        
      .PARAMETER SiteServer  
           FQDN of the Configuration Manager server  
        
      .PARAMETER DeleteSystems  
           Select to automatically delete systems from Configuration Manager  
        
      .NOTES  
           ===========================================================================  
           Created with:     SAPIEN Technologies, Inc., PowerShell Studio 2022 v5.8.208  
           Created on:       7/26/2022 8:00 AM  
           Created by:       Mick Pletcher  
           Filename:         MECMADCleanup.ps1  
           ===========================================================================  
 #&amp;gt;  
 [CmdletBinding()]  
 param  
 (  
      [ValidateNotNullOrEmpty()]  
      [string]$SQLServer,  
      [ValidateNotNullOrEmpty()]  
      [string]$SQLDatabase,  
      [string]$PSHCfgMgrModule,  
      [string]$SiteCode,  
      [string]$SiteServer,  
      [switch]$DeleteSystems  
 )  
   
 function Get-PSHModule {  
 &amp;lt;#  
      .SYNOPSIS  
           Import Module  
        
      .DESCRIPTION  
           Import specified module  
        
      .PARAMETER Module  
           Name of PowerShell Module  
        
      .PARAMETER NoInstall  
           Import only. Typically used for modules that are not in the PowerShell Gallery  
        
      .NOTES  
           Additional information about the function.  
 #&amp;gt;  
        
      [CmdletBinding()]  
      param  
      (  
           [ValidateNotNullOrEmpty()]  
           [string]$Module,  
           [switch]$NoInstall  
      )  
      If ($NoInstall.IsPresent) {  
           Import-Module -Name $Module  
      }  
      else {  
           Try {  
                Import-Module -Name $Module  
           }  
           Catch {  
                Find-Module -Name $Module | Install-Module -Force  
                Import-Module -Name $Module  
           }  
      }  
 }  
   
 #Import SQL Server PowerShell Module  
 Get-PSHModule -Module &quot;SqlServer&quot;  
 #Import AD PowerShell module  
 Get-PSHModule -Module &quot;ActiveDirectory&quot;  
 $Systems = @()  
 #Get All Systems list from ConfigMgr  
 $List = Invoke-Sqlcmd -ServerInstance $SQLServer -Database $SQLDatabase -Query &quot;SELECT NAME FROM dbo._RES_COLL_SMS00001 ORDER BY Name&quot;  
 foreach ($System in $List) {  
      #Filter out built-in accounts  
      If (($System.Name -notlike &#39;*Unknown*&#39;) -and ($System.Name -notlike &#39;*Provisioning*&#39;)) {  
           #Return a list of all systems either not in AD or that have been disabled  
           Try {  
                $AD = Get-ADComputer $System.Name  
                If ($AD.Enabled -eq $false) {  
                     $Systems += $AD.Name  
                }  
           } catch {  
                $Systems += $System.Name  
           }  
      }  
 }  
 #Display the systems to be deleted from ConfigMgr
 $Systems  
 $Systems.Count  
 If ($Systems.Count -ne 0) {  
      If ($DeleteSystems.IsPresent) {  
           #Import ConfigMgr Module  
           Get-PSHModule -Module $PSHCfgMgrModule -NoInstall  
           If ((Get-PSDrive -Name $SiteCode -PSProvider CMSite -ErrorAction SilentlyContinue) -eq $null) {  
                New-PSDrive -Name $SiteCode -PSProvider CMSite -Root $SiteServer  
           }  
           Set-Location &quot;$($SiteCode):\&quot;  
           $Systems | ForEach-Object {  
                Write-Host (&#39;Deleting &#39; + $_ + &#39;.....&#39;) -NoNewline  
                Remove-CMDevice -Name $_ -Force  
                If ((Get-CMDevice -Name $_) -eq $null) {  
                     Write-Host &#39;Success&#39; -ForegroundColor Yellow  
                } else {  
                     Write-Host &#39;Failed&#39; -ForegroundColor Red  
                }  
           }  
      }  
 }  
        
&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://mickitblog.blogspot.com/feeds/640834772518313468/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mickitblog.blogspot.com/2022/07/mecm-system-cleanup.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/640834772518313468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/640834772518313468'/><link rel='alternate' type='text/html' href='http://mickitblog.blogspot.com/2022/07/mecm-system-cleanup.html' title='MECM System Cleanup'/><author><name>Mick Pletcher</name><uri>http://www.blogger.com/profile/09597651323688418212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1GjVWF_81hun8PvhRSvbXBJHCYVoX_UJZbi7SbHgHEXQJ8An20_JaeeW8tAwDbyQAW4jpEb0H_eL4cOgwfX3Jx4hMBbD1vdmfjsk8w0c6TNCBnkvgxUMVn54cUbe3yQ/s151/396426_10151292562288888_1032319935_n.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh41ymtXRdPehGXO7oTlZvAOWd1G5ZtGhpoxH6-Ulc-qsoc97yzcPLDb16br9i0hOCJUALKJhiZnRVisj5mNX9YGvQew9RjyUXwIO0vR5W1SjF8nkqhhamcmkb8GjKH01RYllhRtrb9EGqTb5GoEZ7fWhanmUzlB1XA65YcShwd65lWOTMgpK4mW-ac/s72-w640-h190-c/Capture.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159186316497589396.post-6409046141594965117</id><published>2022-07-27T08:10:00.000-05:00</published><updated>2022-07-27T08:10:02.640-05:00</updated><title type='text'>Configuration Manager PowerShell Module: An update to the existing console is available </title><content type='html'>&lt;p&gt;I was recently writing a new PowerShell tool to clean up Configuration Manager of old systems. When I ran the import-module cmdlet, I got the message&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaCJhkW6lyLfGIjbuX5vpkBCWPUVKLQ0XmZG8k98zQDHFYNuudvArQNdOMppygxFhtdMHbXLPIRtH-kr0j3t_BBtotXms4ZN3-B3uxaOGNyqzUk-63TVeTfMYtHXsPVf4OcDw-j33gBmfFy8hA5BJ9FbgUvYn9OAwXUO8dPl6HtyFgaLN4qMo0F_X_/s606/Capture.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;19&quot; data-original-width=&quot;606&quot; height=&quot;20&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaCJhkW6lyLfGIjbuX5vpkBCWPUVKLQ0XmZG8k98zQDHFYNuudvArQNdOMppygxFhtdMHbXLPIRtH-kr0j3t_BBtotXms4ZN3-B3uxaOGNyqzUk-63TVeTfMYtHXsPVf4OcDw-j33gBmfFy8hA5BJ9FbgUvYn9OAwXUO8dPl6HtyFgaLN4qMo0F_X_/w640-h20/Capture.JPG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;The module was being imported from the Configuration Manager server. I always keep ConfigMgr up-to-date with the latest version within days of release and I saw the console was 5.2203.1063.2400. Doing a little digging, I found this was coming from the console that was installed on my laptop and not from the server. I also found that even if you import the PowerShell module from the server where it is the latest version, it will revert back to the machine you are working on to import from if the console is installed there. I upgraded the console on my laptop and this message disappeared.&amp;nbsp;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://mickitblog.blogspot.com/feeds/6409046141594965117/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mickitblog.blogspot.com/2022/07/configuration-manager-powershell-module.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/6409046141594965117'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/6409046141594965117'/><link rel='alternate' type='text/html' href='http://mickitblog.blogspot.com/2022/07/configuration-manager-powershell-module.html' title='Configuration Manager PowerShell Module: An update to the existing console is available '/><author><name>Mick Pletcher</name><uri>http://www.blogger.com/profile/09597651323688418212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1GjVWF_81hun8PvhRSvbXBJHCYVoX_UJZbi7SbHgHEXQJ8An20_JaeeW8tAwDbyQAW4jpEb0H_eL4cOgwfX3Jx4hMBbD1vdmfjsk8w0c6TNCBnkvgxUMVn54cUbe3yQ/s151/396426_10151292562288888_1032319935_n.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaCJhkW6lyLfGIjbuX5vpkBCWPUVKLQ0XmZG8k98zQDHFYNuudvArQNdOMppygxFhtdMHbXLPIRtH-kr0j3t_BBtotXms4ZN3-B3uxaOGNyqzUk-63TVeTfMYtHXsPVf4OcDw-j33gBmfFy8hA5BJ9FbgUvYn9OAwXUO8dPl6HtyFgaLN4qMo0F_X_/s72-w640-h20-c/Capture.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159186316497589396.post-2820087053990422353</id><published>2022-07-01T13:57:00.006-05:00</published><updated>2022-07-01T14:02:00.527-05:00</updated><title type='text'>Bitlocker Recovery Password AD Backup and Cleanup</title><content type='html'>This PowerShell script not only backs up the Bitlocker recovery password to AD but also cleans out previous backups made that do not match the current password associated with the machine.&amp;nbsp;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The script retrieves the local bitlocker password along with all recovery passwords written to AD. It will then parse through the associated passwords and remove all that does not match the one associated with the local machine. This greatly helps keep AD clean of old passwords. This script can be set up to automatically execute on a machine through Azure Automation, Orchestrator, Intune, or ConfigMgr. It will need to be executed using an account with credentials to both read the bitlocker recovery password on the local machine and modify the AD Objects. You can download the script from my &lt;a href=&quot;https://github.com/MicksITBlogs/PowerShell/blob/master/BitlockerRecoveryPasswordADBackupCleanup.ps1&quot; target=&quot;_blank&quot;&gt;GitHub repository&lt;/a&gt;.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2Ef2oSGZHoG-CcFgAt7fCe1Os2a425arvU93VXsDqoZZfUWvsUZpCU1F9_Zb3Sjw3qYw9JfshyclEn7xcDJijSEAfDAigsLdVvawEyGPhWBVH0zxojb58L30vJ6O5Cou_uNZLHmvpeFbvp-NaBrgf0HSef4ugUpz723kRCXP4dWRKuoyovLUYyau3/s583/Capture.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;75&quot; data-original-width=&quot;583&quot; height=&quot;51&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2Ef2oSGZHoG-CcFgAt7fCe1Os2a425arvU93VXsDqoZZfUWvsUZpCU1F9_Zb3Sjw3qYw9JfshyclEn7xcDJijSEAfDAigsLdVvawEyGPhWBVH0zxojb58L30vJ6O5Cou_uNZLHmvpeFbvp-NaBrgf0HSef4ugUpz723kRCXP4dWRKuoyovLUYyau3/w400-h51/Capture.JPG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;NOTE: If you do not want the script to display the recovery password, you can comment out the write-host lines.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;

&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz1xGp9q86dTZmBT6Kgf4lTiCRnpB-883UDue4w0nS25otuiDMzqANNGCcUIMXUyHVEm0-djravLr2rh4_OiSiUlcv2KthEqRgIz1dikIsp_zoYcmSlQyrulsFHeMkbNa6Gd9iCnqBnO-K/s320/codebg.gif); background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; background: rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; overflow-wrap: normal; word-wrap: normal;&quot;&gt; &amp;lt;#       
      .NOTES  
      ===========================================================================  
       Created with:    SAPIEN Technologies, Inc., PowerShell Studio 2022 v5.8.208  
       Created on:      7/1/2022 11:08 AM  
       Created by:      Mick Pletcher  
       Filename:        BitlockerRecoveryPasswordADBackupCleanup.ps1  
      ===========================================================================  
      .DESCRIPTION  
           This script will delete active directory entries that contain the Bitlocker recovery keys which do not match to the current one. It will then push up the new key to AD.  
 #&amp;gt;  
   
 [CmdletBinding()]  
 param ()  
   
 Clear-Host  
 #Get the local bitlocker password  
 $LocalPassword = ((manage-bde -protectors -get ($env:ProgramFiles).split(&#39;\&#39;)[0] -id ((Get-WmiObject -Namespace &#39;Root\cimv2\Security\MicrosoftVolumeEncryption&#39; -Class &#39;Win32_EncryptableVolume&#39;).GetKeyProtectors(3).volumeKeyprotectorID)).trim() | Where-Object { $_.Trim() -ne &#39;&#39; })[-1]  
 $BitlockerID = (((manage-bde -protectors -get ($env:ProgramFiles).split(&#39;\&#39;)[0] -id ((Get-WmiObject -Namespace &#39;Root\cimv2\Security\MicrosoftVolumeEncryption&#39; -Class &#39;Win32_EncryptableVolume&#39;).GetKeyProtectors(3).volumeKeyprotectorID)).trim() | Where-Object { $_.Trim() -ne &#39;&#39; })[-3]).split(&quot;:&quot;)[1].trim()  
 #Get all bitlocker entries from active directory  
 $ADEntries = (Get-ADObject -Filter { objectclass -eq &#39;msFVE-RecoveryInformation&#39; } -SearchBase (Get-ADComputer $env:COMPUTERNAME).DistinguishedName -Properties &#39;msFVE-RecoveryPassword&#39;)  
 #Number of recovery key entries stored in AD  
 $EntryCount = 0  
 #Parse through all active directory entries removing ones that do not contain local bitlocker password  
 foreach ($Item in $ADEntries) {  
      If ($LocalPassword -ne $Item.&#39;msFVE-RecoveryPassword&#39;) {  
           Remove-ADObject -Identity $Item.DistinguishedName -Confirm:$false  
      }  
      else {  
           $EntryCount += 1  
           If ($EntryCount -gt 1) {  
                Remove-ADObject -Identity $Item.DistinguishedName -Confirm:$false  
           }  
      }  
 }  
 $ADEntries = (Get-ADObject -Filter { objectclass -eq &#39;msFVE-RecoveryInformation&#39; } -SearchBase (Get-ADComputer $env:COMPUTERNAME).DistinguishedName -Properties &#39;msFVE-RecoveryPassword&#39;)  
 #Backup the bitlocker password to active directory if it is not in any AD entries  
 If ($LocalPassword -notin $ADEntries.&#39;msFVE-RecoveryPassword&#39;) {  
      #Backup recovery key to active directory  
      $Switches = &quot;-protectors -adbackup c: -id&quot; + [char]32 + $BitlockerID  
      Write-Host &quot;Backing up to AD.....&quot; -NoNewline  
      $ErrCode = (Start-Process -FilePath $env:windir&#39;\system32\manage-bde.exe&#39; -ArgumentList $Switches -PassThru -Wait).ExitCode  
      If ($ErrCode -eq 0) {  
           Write-Host &quot;Success&quot; -ForegroundColor Yellow  
           $ADEntries = (Get-ADObject -Filter { objectclass -eq &#39;msFVE-RecoveryInformation&#39; } -SearchBase (Get-ADComputer $env:COMPUTERNAME).DistinguishedName -Properties &#39;msFVE-RecoveryPassword&#39;)  
           Write-Host  
           Write-Host &quot; Bitlocker ID:&quot; -NoNewline  
           Write-Host $BitlockerID -ForegroundColor Yellow  
           Write-Host &quot;Local Password:&quot; -NoNewline  
           Write-Host $LocalPassword -ForegroundColor Yellow  
           Write-Host &quot;  AD Password:&quot; -NoNewline  
           Write-Host $ADEntries.&#39;msFVE-RecoveryPassword&#39; -ForegroundColor Yellow  
           If ($LocalPassword -eq $ADEntries.&#39;msFVE-RecoveryPassword&#39;) {  
                Exit 0  
           }  
      }  
      elseif ($ErrCode -eq &quot;-2147024809&quot;) {  
           $Status = [string]((manage-bde.exe -status).replace(&#39; &#39;, &#39;&#39;)).split(&quot;:&quot;)[16]  
           If ($Status -eq &quot;FullyDecrypted&quot;) {  
                Write-Host &quot;Failed. System is not Bitlockered&quot;  
                Exit 2  
           }  
           else {  
                Write-Host &quot;Unspecified error&quot;  
                Exit 3  
           }  
      }  
      else {  
           Write-Host &quot;Failed with error code&quot;$ErrCode -ForegroundColor Red  
           Write-Host  
           Write-Host &quot; Bitlocker ID:&quot; -NoNewline  
           Write-Host $BitlockerID -ForegroundColor Yellow  
           Write-Host &quot;Local Password:&quot; -NoNewline  
           Write-Host $LocalPassword -ForegroundColor Yellow  
           Write-Host &quot;  AD Password:&quot; -NoNewline  
           Write-Host $ADEntries.&#39;msFVE-RecoveryPassword&#39; -ForegroundColor Yellow  
           Exit 1  
      }  
 }  
 else {  
      Write-Host  
      Write-Host &quot; Bitlocker ID:&quot;$BitlockerID  
      Write-Host &quot;Local Password:&quot;$LocalPassword  
      Write-Host &quot;  AD Password:&quot;$ADEntries.&#39;msFVE-RecoveryPassword&#39;  
      Exit 0  
 }  
   
&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://mickitblog.blogspot.com/feeds/2820087053990422353/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mickitblog.blogspot.com/2022/07/bitlocker-recovery-password-ad-backup.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/2820087053990422353'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/2820087053990422353'/><link rel='alternate' type='text/html' href='http://mickitblog.blogspot.com/2022/07/bitlocker-recovery-password-ad-backup.html' title='Bitlocker Recovery Password AD Backup and Cleanup'/><author><name>Mick Pletcher</name><uri>http://www.blogger.com/profile/09597651323688418212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1GjVWF_81hun8PvhRSvbXBJHCYVoX_UJZbi7SbHgHEXQJ8An20_JaeeW8tAwDbyQAW4jpEb0H_eL4cOgwfX3Jx4hMBbD1vdmfjsk8w0c6TNCBnkvgxUMVn54cUbe3yQ/s151/396426_10151292562288888_1032319935_n.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2Ef2oSGZHoG-CcFgAt7fCe1Os2a425arvU93VXsDqoZZfUWvsUZpCU1F9_Zb3Sjw3qYw9JfshyclEn7xcDJijSEAfDAigsLdVvawEyGPhWBVH0zxojb58L30vJ6O5Cou_uNZLHmvpeFbvp-NaBrgf0HSef4ugUpz723kRCXP4dWRKuoyovLUYyau3/s72-w400-h51-c/Capture.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159186316497589396.post-1920790984060589231</id><published>2022-06-30T15:22:00.002-05:00</published><updated>2022-06-30T15:22:51.239-05:00</updated><title type='text'>Automating Dell TPM Configuration</title><content type='html'>&lt;p&gt;Over the years, we have manually configured the TPM before imaging a system as part of our build process. Dell has since given the ability to automate the entire process after giving the option to automate clearing the TPM. That was always been the big stopper in full automation.&amp;nbsp;&lt;/p&gt;&lt;p&gt;I wrote a series of scripts that I put into the build process that do all of the necessary steps in readying the TPM for bitlocker as shown below. The Smart Reporting, and Wake-On-LAN are additional features I added that do not pertain to the TPM and Bitlocker. The Conditional Reboot is another PowerShell script I wrote that checks if the system is waiting for a reboot and reboots the system if necessary. If interested, this is in another blog of mine.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq_QuqnqCDzNBJg6QonGij-cMBSXgMBKM6mCR6XcTiaEuMcTszgMLGHe_9kKaD5LpI452lIknwSfhjAk9mq3Rg2_vPZ3KR84P4wiEDTO3lBzx9s2tVwpV1xzPi8ot1l932RuKEHKoe2FpUox_kNwHq_sI5ahiIgzs5bPRoVHtS_-bt5FMneY2Xv731/s309/Capture.JPG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;309&quot; data-original-width=&quot;203&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq_QuqnqCDzNBJg6QonGij-cMBSXgMBKM6mCR6XcTiaEuMcTszgMLGHe_9kKaD5LpI452lIknwSfhjAk9mq3Rg2_vPZ3KR84P4wiEDTO3lBzx9s2tVwpV1xzPi8ot1l932RuKEHKoe2FpUox_kNwHq_sI5ahiIgzs5bPRoVHtS_-bt5FMneY2Xv731/w263-h400/Capture.JPG&quot; width=&quot;263&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Here are the files to download. The names correspond with the list shown above so you know what sequence to put them in. I clear the BIOS password at the start and then reset it near the end as setting the PPI TPM Clear requires a BIOS password to be in place to check off that box via a script. These scripts were successfully tested on Dell Optiplex 7070 and Latitude 7420. There was nothing manual that had to be done to ready the TPM for bitocker.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;&lt;a href=&quot;https://github.com/MicksITBlogs/PowerShell/blob/master/ClearDellBIOSPassword.ps1&quot; target=&quot;_blank&quot;&gt;ClearDellBIOSPassword.ps1&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://github.com/MicksITBlogs/PowerShell/blob/master/ClearTPM.ps1&quot; target=&quot;_blank&quot;&gt;ClearTPM.ps1&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://github.com/MicksITBlogs/PowerShell/blob/master/InitializeTPM.ps1&quot; target=&quot;_blank&quot;&gt;InitializeTPM.ps1&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://github.com/MicksITBlogs/PowerShell/blob/master/InitializeTPM.ps1&quot; target=&quot;_blank&quot;&gt;PPI.ps1&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://github.com/MicksITBlogs/PowerShell/blob/master/SetDellBIOSPassword.ps1&quot; target=&quot;_blank&quot;&gt;SetDellBIOSPassword.ps1&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://github.com/MicksITBlogs/PowerShell/blob/master/TurnOnTPM.ps1&quot; target=&quot;_blank&quot;&gt;TurnOnTPM.ps1&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href=&quot;https://github.com/MicksITBlogs/PowerShell/blob/master/WakeOnLAN.ps1&quot; target=&quot;_blank&quot;&gt;WakeOnLAN.ps1&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://mickitblog.blogspot.com/feeds/1920790984060589231/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mickitblog.blogspot.com/2022/06/automating-dell-tpm-configuration.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/1920790984060589231'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/1920790984060589231'/><link rel='alternate' type='text/html' href='http://mickitblog.blogspot.com/2022/06/automating-dell-tpm-configuration.html' title='Automating Dell TPM Configuration'/><author><name>Mick Pletcher</name><uri>http://www.blogger.com/profile/09597651323688418212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1GjVWF_81hun8PvhRSvbXBJHCYVoX_UJZbi7SbHgHEXQJ8An20_JaeeW8tAwDbyQAW4jpEb0H_eL4cOgwfX3Jx4hMBbD1vdmfjsk8w0c6TNCBnkvgxUMVn54cUbe3yQ/s151/396426_10151292562288888_1032319935_n.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiq_QuqnqCDzNBJg6QonGij-cMBSXgMBKM6mCR6XcTiaEuMcTszgMLGHe_9kKaD5LpI452lIknwSfhjAk9mq3Rg2_vPZ3KR84P4wiEDTO3lBzx9s2tVwpV1xzPi8ot1l932RuKEHKoe2FpUox_kNwHq_sI5ahiIgzs5bPRoVHtS_-bt5FMneY2Xv731/s72-w263-h400-c/Capture.JPG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159186316497589396.post-5506717280449511204</id><published>2022-03-17T09:15:00.001-05:00</published><updated>2022-03-17T09:15:23.504-05:00</updated><title type='text'>Identify Machines a User is Logged Into using Carbon Black</title><content type='html'>If you have Carbon Black in your environment, you can use it to identify which machines a user account is logged into. Carbon Black collects a vast amount of data on machines and reports it to the cloud database. The following is how to use Carbon Black to list the machines:&lt;div&gt;&lt;ol style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Log into the Carbon Black Cloud Portal&lt;/li&gt;&lt;li&gt;Click the Investigate tab&lt;/li&gt;&lt;li&gt;In the investigate search field at the top, enter the following:&amp;nbsp;&lt;/li&gt;&lt;ol&gt;&lt;li&gt;Enter &lt;b&gt;process_username:&amp;lt;username&amp;gt;&lt;/b&gt; in the search field at the top. &amp;lt;username&amp;gt; needs to be changed to the actual username you are searching for.&lt;/li&gt;&lt;li&gt;Change the time field to the right to within one day or less&lt;/li&gt;&lt;li&gt;Click the magnifying glass on the far right to search.&amp;nbsp;&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;Under the filters field, scroll down to Device and it will show a list of devices the profile is currently logged into.&amp;nbsp;&lt;/li&gt;&lt;/ol&gt;&lt;div&gt;As you can see in the screenshot under devices, it returned two machines my profile was logged into.&amp;nbsp;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjK_LzTUVvzpAUWzSsohsTCa5HRorD70AbK1YPio-Ry4BQwap6E73_Tlg9nHoQT0B7FVx5zx-A4A9e5SPFzKb1RFtEczqp_7kOG8YJDYYezPYeTCt7KSAPkKOed7hQ1WiXG9vvXQ9BeWpQ7v5gGoGzf8vaoBLpbs8wGG_jDeZSiyOUA-Bo4xPkaF0c1=s1441&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;789&quot; data-original-width=&quot;1441&quot; height=&quot;350&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEjK_LzTUVvzpAUWzSsohsTCa5HRorD70AbK1YPio-Ry4BQwap6E73_Tlg9nHoQT0B7FVx5zx-A4A9e5SPFzKb1RFtEczqp_7kOG8YJDYYezPYeTCt7KSAPkKOed7hQ1WiXG9vvXQ9BeWpQ7v5gGoGzf8vaoBLpbs8wGG_jDeZSiyOUA-Bo4xPkaF0c1=w640-h350&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mickitblog.blogspot.com/feeds/5506717280449511204/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mickitblog.blogspot.com/2022/03/identify-machines-user-is-logged-into.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/5506717280449511204'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/5506717280449511204'/><link rel='alternate' type='text/html' href='http://mickitblog.blogspot.com/2022/03/identify-machines-user-is-logged-into.html' title='Identify Machines a User is Logged Into using Carbon Black'/><author><name>Mick Pletcher</name><uri>http://www.blogger.com/profile/09597651323688418212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1GjVWF_81hun8PvhRSvbXBJHCYVoX_UJZbi7SbHgHEXQJ8An20_JaeeW8tAwDbyQAW4jpEb0H_eL4cOgwfX3Jx4hMBbD1vdmfjsk8w0c6TNCBnkvgxUMVn54cUbe3yQ/s151/396426_10151292562288888_1032319935_n.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEjK_LzTUVvzpAUWzSsohsTCa5HRorD70AbK1YPio-Ry4BQwap6E73_Tlg9nHoQT0B7FVx5zx-A4A9e5SPFzKb1RFtEczqp_7kOG8YJDYYezPYeTCt7KSAPkKOed7hQ1WiXG9vvXQ9BeWpQ7v5gGoGzf8vaoBLpbs8wGG_jDeZSiyOUA-Bo4xPkaF0c1=s72-w640-h350-c" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159186316497589396.post-1442985840943177863</id><published>2022-03-16T08:22:00.002-05:00</published><updated>2022-03-16T08:22:50.495-05:00</updated><title type='text'>Last Server Reboot Reporting</title><content type='html'>&lt;p&gt;Recently, we needed a report of the last boot time of all servers. I wrote this PowerShell script that queries AD for a list of all windows servers and then does a WMI query on each server for the LastBootUpTime. It then calculates the number of days and writes this to an object with the computer name and the number of days since the last reboot. It will write this info to a CSV file.&amp;nbsp;&lt;/p&gt;&lt;p&gt;You can download the script from my &lt;a href=&quot;https://github.com/MicksITBlogs/PowerShell/blob/master/LastReboot.ps1&quot; target=&quot;_blank&quot;&gt;GitHub site&lt;/a&gt;.&lt;/p&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz1xGp9q86dTZmBT6Kgf4lTiCRnpB-883UDue4w0nS25otuiDMzqANNGCcUIMXUyHVEm0-djravLr2rh4_OiSiUlcv2KthEqRgIz1dikIsp_zoYcmSlQyrulsFHeMkbNa6Gd9iCnqBnO-K/s320/codebg.gif); background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; background: #f0f0f0; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; overflow-wrap: normal; word-wrap: normal;&quot;&gt; Import-Module -Name ActiveDirectory -Force  
 #Get list of windows based servers  
 $Servers = Get-ADComputer -Filter * -Properties * | Where-Object {$_.OperatingSystem -like &#39;*windows server*&#39;} | Select Name | Sort-Object -Property Name  
 #Create Report Array  
 $Report = @()  
 #Parse through server list  
 Foreach ($Server in $Servers) {  
   #Get the computer name  
   $ComputerName = ([String]$Server).Split(&quot;=&quot;)[1].Split(&quot;}&quot;)[0].Trim()  
   #Check if the system is online  
   If ((Test-Connection -ComputerName $ComputerName -Count 1 -Quiet) -eq $true) {  
     #Query last bootup time and use $Null if unobtainable  
     Try {  
       $LastBootTime = (Get-CimInstance -ClassName win32_operatingsystem -ComputerName $ComputerName -ErrorAction SilentlyContinue).LastBootUpTime  
       $LastBoot = (New-TimeSpan -Start $LastBootTime -End (Get-Date)).Days  
     } Catch {  
       $LastBoot = $null  
     }  
     #Add computername and last boot time to the object  
     If ($ComputerName -ne $null) {  
       $SystemObject = New-Object -TypeName psobject  
       $SystemObject | Add-Member -MemberType NoteProperty -Name ComputerName -Value $ComputerName  
       $SystemObject | Add-Member -MemberType NoteProperty -Name DaysSinceLastBoot -Value $LastBoot  
       $Report += $SystemObject  
     }  
   } else {  
       $SystemObject = New-Object -TypeName psobject  
       $SystemObject | Add-Member -MemberType NoteProperty -Name ComputerName -Value $ComputerName  
       $SystemObject | Add-Member -MemberType NoteProperty -Name DaysSinceLastBoot -Value &#39;OFFLINE&#39;  
       $Report += $SystemObject  
   }  
   $ComputerName = $null  
 }  
 #Print report to screen  
 $Report  
 $OutFile = &quot;C:\Users\Desktop\LastRebootReport.csv&quot;  
 #Delete CSV file if it already exists  
 If ((Test-Path -Path $OutFile) -eq $true) {  
   Remove-Item -Path $OutFile -Force  
 }  
 #Export report to CSV file  
 $Report | Export-Csv -Path $OutFile -NoClobber -Encoding UTF8 -NoTypeInformation -Force  
   
&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://mickitblog.blogspot.com/feeds/1442985840943177863/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mickitblog.blogspot.com/2022/03/last-server-reboot-reporting.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/1442985840943177863'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/1442985840943177863'/><link rel='alternate' type='text/html' href='http://mickitblog.blogspot.com/2022/03/last-server-reboot-reporting.html' title='Last Server Reboot Reporting'/><author><name>Mick Pletcher</name><uri>http://www.blogger.com/profile/09597651323688418212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1GjVWF_81hun8PvhRSvbXBJHCYVoX_UJZbi7SbHgHEXQJ8An20_JaeeW8tAwDbyQAW4jpEb0H_eL4cOgwfX3Jx4hMBbD1vdmfjsk8w0c6TNCBnkvgxUMVn54cUbe3yQ/s151/396426_10151292562288888_1032319935_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159186316497589396.post-4667112584726118143</id><published>2022-03-07T12:28:00.002-06:00</published><updated>2022-03-07T12:28:36.796-06:00</updated><title type='text'>Configure SQL Server Firewall Ports with PowerShell</title><content type='html'>&lt;p&gt;&amp;nbsp;I recently had to rebuild the Configuration Manager server. As I was running the prerequisite tool, it showed it could not communicate with the SQL server that is separate from the Configuration Manager Server. The issue ended up being ports needed to be opened up.&amp;nbsp;&lt;/p&gt;&lt;p&gt;This PowerShell script will configure the correct ports. It also adds to the description as to what services the port is opened up for in Configuration Manager. If the rule is already present, it skips over. If you open up a rule after the script is executed, you will see it says This is a predefined rule and some of its properties cannot be modified. This was caused by me adding the rule to the group Configuration Manager. If -Group is removed from the cmdlet, this message disappears.&amp;nbsp;&lt;/p&gt;&lt;p&gt;You can download the script from &lt;a href=&quot;https://github.com/MicksITBlogs/PowerShell/blob/master/ConfigMgrSQLFirewallSettings.ps1&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;
&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz1xGp9q86dTZmBT6Kgf4lTiCRnpB-883UDue4w0nS25otuiDMzqANNGCcUIMXUyHVEm0-djravLr2rh4_OiSiUlcv2KthEqRgIz1dikIsp_zoYcmSlQyrulsFHeMkbNa6Gd9iCnqBnO-K/s320/codebg.gif); background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; background: #f0f0f0; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; overflow-wrap: normal; word-wrap: normal;&quot;&gt; If ((Get-NetFirewallRule -Name &quot;ConfigMgr Port 135 UDP&quot; -ErrorAction SilentlyContinue) -eq $null) {  
 New-NetFirewallRule -Name &quot;ConfigMgr Port 135 UDP&quot; -DisplayName &quot;ConfigMgr Port 135 UDP&quot; -Description &quot;Site Server&quot; -Group &quot;Configuration Manager&quot; -Profile &quot;Domain&quot; -Protocol UDP -LocalPort 135 -Enabled True  
 }  
 If ((Get-NetFirewallRule -Name &quot;ConfigMgr Port 135 TCP&quot; -ErrorAction SilentlyContinue) -eq $null) {  
   New-NetFirewallRule -Name &quot;ConfigMgr Port 135 TCP&quot; -DisplayName &quot;ConfigMgr Port 135 TCP&quot; -Description &quot;Site Server&quot; -Group &quot;Configuration Manager&quot; -Profile &quot;Domain&quot; -Protocol TCP -LocalPort 135 -Enabled True  
 }  
 If ((Get-NetFirewallRule -Name &quot;ConfigMgr Port 1433 TCP&quot; -ErrorAction SilentlyContinue) -eq $null) {  
   New-NetFirewallRule -Name &quot;ConfigMgr Port 1433 TCP&quot; -DisplayName &quot;ConfigMgr Port 1433 TCP&quot; -Description &quot;Asset Intelligence Synchronization Point, App Catalog Web Service Point, Endpoint Protection, Enrollment Point, MP, Reporting point, Site Server, SMS Provider, SQL Server, SMP&quot; -Group &quot;Configuration Manager&quot; -Profile &quot;Domain&quot; -Protocol TCP -LocalPort 1433 -Enabled True  
 }  
 If ((Get-NetFirewallRule -Name &quot;ConfigMgr Port 4022 TCP&quot; -ErrorAction SilentlyContinue) -eq $null) {  
   New-NetFirewallRule -Name &quot;ConfigMgr Port 4022 TCP&quot; -DisplayName &quot;ConfigMgr Port 4022 TCP&quot; -Description &quot;SQL Server&quot; -Group &quot;Configuration Manager&quot; -Profile &quot;Domain&quot; -Protocol TCP -LocalPort 4022 -Enabled True  
 }  
 If ((Get-NetFirewallRule -Name &quot;ConfigMgr Port 445 TCP&quot; -ErrorAction SilentlyContinue) -eq $null) {  
   New-NetFirewallRule -Name &quot;ConfigMgr Port 445 TCP&quot; -DisplayName &quot;ConfigMgr Port 445 TCP&quot; -Description &quot;Site Server&quot; -Group &quot;Configuration Manager&quot; -Profile &quot;Domain&quot; -Protocol TCP -LocalPort 445 -Enabled True  
 }  
   
&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://mickitblog.blogspot.com/feeds/4667112584726118143/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mickitblog.blogspot.com/2022/03/configure-sql-server-firewall-ports.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/4667112584726118143'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/4667112584726118143'/><link rel='alternate' type='text/html' href='http://mickitblog.blogspot.com/2022/03/configure-sql-server-firewall-ports.html' title='Configure SQL Server Firewall Ports with PowerShell'/><author><name>Mick Pletcher</name><uri>http://www.blogger.com/profile/09597651323688418212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1GjVWF_81hun8PvhRSvbXBJHCYVoX_UJZbi7SbHgHEXQJ8An20_JaeeW8tAwDbyQAW4jpEb0H_eL4cOgwfX3Jx4hMBbD1vdmfjsk8w0c6TNCBnkvgxUMVn54cUbe3yQ/s151/396426_10151292562288888_1032319935_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159186316497589396.post-5600540155348219681</id><published>2022-01-24T15:23:00.002-06:00</published><updated>2022-01-25T08:26:32.158-06:00</updated><title type='text'>Troubleshooting No Task Sequences are available (Tasksequence.xml does not exist, is empty, or is inaccessible)</title><content type='html'>&lt;p&gt;&amp;nbsp;I encountered this error when working with MDT right after deleting two old task sequences.&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEg6Pq4bSBy3geekp0CquVF3Dd92cdx2EJcstQ6kXuu68dy9aTyh9b-YulLYF_WVF2xvYI6podq3tTMDFfYgVUq_XUp6hW1eHdXK6ysbUGA2TOTivSAiax_5GQ-h3a5IizojTCVMwX4Oja9j5F8SvocCjPKC9vtrD_WSxtS27Q4qFzWNz-HNT2LQK47Q=s4032&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;3024&quot; data-original-width=&quot;4032&quot; height=&quot;480&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEg6Pq4bSBy3geekp0CquVF3Dd92cdx2EJcstQ6kXuu68dy9aTyh9b-YulLYF_WVF2xvYI6podq3tTMDFfYgVUq_XUp6hW1eHdXK6ysbUGA2TOTivSAiax_5GQ-h3a5IizojTCVMwX4Oja9j5F8SvocCjPKC9vtrD_WSxtS27Q4qFzWNz-HNT2LQK47Q=w640-h480&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;To troubleshoot this, I went to the logs directory in the MDT hierarchy. I specified in the customsettings.ini file to write all build logs to this specific directory:&lt;/p&gt;&lt;p&gt;SLShare=\\BUILD\PRODDeploymentShare$\Logs&lt;/p&gt;&lt;p&gt;SLShareDynamicLogging=\\BUILD\PRODDeploymentShare$\Logs\%ComputerName%&lt;/p&gt;&lt;p&gt;When I went into the logs, I opened up the only log there, BDD.log, and found that it could not find the task sequence specified in the TaskSequences.xml file. I then opened up the TaskSequences.xml file, which is located at %DEPLOYROOT%\Control\TaskSequences.xml. Once I opened up the XML, I searched for the task sequence no found and deleted it. That fixed the issue.&amp;nbsp;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiHDSlva29kwFgq1yEnqRRgR6AaMpvrxszm0LhzWTJZ5Y612G5WriCPzG0QC_XuS2GQsG9iAsuii56AMV-bjMsJjmrJ04IfI9mlvL2ZyLcIXygi9F74XIMaMeMZX7tc4QsmlIfrgEjuvdUqA0IMsdcvt2LJbU_onpGRA5hqVMktiewlOVq39XXXKfst=s1431&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;118&quot; data-original-width=&quot;1431&quot; height=&quot;52&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEiHDSlva29kwFgq1yEnqRRgR6AaMpvrxszm0LhzWTJZ5Y612G5WriCPzG0QC_XuS2GQsG9iAsuii56AMV-bjMsJjmrJ04IfI9mlvL2ZyLcIXygi9F74XIMaMeMZX7tc4QsmlIfrgEjuvdUqA0IMsdcvt2LJbU_onpGRA5hqVMktiewlOVq39XXXKfst=w640-h52&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://mickitblog.blogspot.com/feeds/5600540155348219681/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mickitblog.blogspot.com/2022/01/troubleshooting-no-task-sequences-are.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/5600540155348219681'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/5600540155348219681'/><link rel='alternate' type='text/html' href='http://mickitblog.blogspot.com/2022/01/troubleshooting-no-task-sequences-are.html' title='Troubleshooting No Task Sequences are available (Tasksequence.xml does not exist, is empty, or is inaccessible)'/><author><name>Mick Pletcher</name><uri>http://www.blogger.com/profile/09597651323688418212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1GjVWF_81hun8PvhRSvbXBJHCYVoX_UJZbi7SbHgHEXQJ8An20_JaeeW8tAwDbyQAW4jpEb0H_eL4cOgwfX3Jx4hMBbD1vdmfjsk8w0c6TNCBnkvgxUMVn54cUbe3yQ/s151/396426_10151292562288888_1032319935_n.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEg6Pq4bSBy3geekp0CquVF3Dd92cdx2EJcstQ6kXuu68dy9aTyh9b-YulLYF_WVF2xvYI6podq3tTMDFfYgVUq_XUp6hW1eHdXK6ysbUGA2TOTivSAiax_5GQ-h3a5IizojTCVMwX4Oja9j5F8SvocCjPKC9vtrD_WSxtS27Q4qFzWNz-HNT2LQK47Q=s72-w640-h480-c" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159186316497589396.post-6642586828831912879</id><published>2022-01-21T08:57:00.001-06:00</published><updated>2022-01-21T08:57:47.727-06:00</updated><title type='text'>How to effectively add Office updates to the update folder</title><content type='html'>&lt;p&gt;If you are still using an on-prem version of office, you know the need to populate the Updates folder so updates get applied when Office is installed instead of having to wait for the updates to download and then be installed. The issue I have run into is some of the updates, once extracted, are named the same. To resolve this, I extract each update from the cab file. Next, I open up the msp file using ORCA. In the MsiPatchMetadata table, you will find the KB number in the Release property. I use that number and rename the msp file to KB4011634.msp for instance. This prevents files from being overwritten. I then copy it back to the Updates folder. Office is able to read the MSP file with no problems.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpfvu0K7OxXm1u4ZtdB55QQT2gP0S52bra2bcZ4H_3qpv-q4efcOgrjsFP9CRdRwN5g6igB0ZdeodZNoF8hbJf1bUzQradAk-jMsPq-bFioXv5I80ir9RMpQo34Fhs-Ak2auTtwlepglE/&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;&quot; data-original-height=&quot;549&quot; data-original-width=&quot;815&quot; height=&quot;432&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpfvu0K7OxXm1u4ZtdB55QQT2gP0S52bra2bcZ4H_3qpv-q4efcOgrjsFP9CRdRwN5g6igB0ZdeodZNoF8hbJf1bUzQradAk-jMsPq-bFioXv5I80ir9RMpQo34Fhs-Ak2auTtwlepglE/w640-h432/image.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://mickitblog.blogspot.com/feeds/6642586828831912879/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mickitblog.blogspot.com/2022/01/how-to-effectively-add-office-updates.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/6642586828831912879'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/6642586828831912879'/><link rel='alternate' type='text/html' href='http://mickitblog.blogspot.com/2022/01/how-to-effectively-add-office-updates.html' title='How to effectively add Office updates to the update folder'/><author><name>Mick Pletcher</name><uri>http://www.blogger.com/profile/09597651323688418212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1GjVWF_81hun8PvhRSvbXBJHCYVoX_UJZbi7SbHgHEXQJ8An20_JaeeW8tAwDbyQAW4jpEb0H_eL4cOgwfX3Jx4hMBbD1vdmfjsk8w0c6TNCBnkvgxUMVn54cUbe3yQ/s151/396426_10151292562288888_1032319935_n.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpfvu0K7OxXm1u4ZtdB55QQT2gP0S52bra2bcZ4H_3qpv-q4efcOgrjsFP9CRdRwN5g6igB0ZdeodZNoF8hbJf1bUzQradAk-jMsPq-bFioXv5I80ir9RMpQo34Fhs-Ak2auTtwlepglE/s72-w640-h432-c/image.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159186316497589396.post-785947431261663446</id><published>2021-12-20T11:02:00.002-06:00</published><updated>2021-12-20T11:02:43.448-06:00</updated><title type='text'>Installing WinGet via PowerShell</title><content type='html'>&lt;p&gt;&amp;nbsp;I wanted to install Winget via PowerShell in an automated process. The first thing I did was to go to the &lt;a href=&quot;https://github.com/microsoft/winget-cli/releases&quot; target=&quot;_blank&quot;&gt;Winget GitHub site&lt;/a&gt; and select the latest version of the Windows Package Manager. Under the latest version page, I clicked on the file with the extension of msixbundle and downloaded it to my machine.&lt;/p&gt;&lt;p&gt;Now that it is on your machine, you can automate the installation with a PowerShell one-liner script where the PS1 file resides in the same directory as the Winget installer. The script will search the current directory for a msixbundle file with the cmdlet listed below.&amp;nbsp;&lt;/p&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz1xGp9q86dTZmBT6Kgf4lTiCRnpB-883UDue4w0nS25otuiDMzqANNGCcUIMXUyHVEm0-djravLr2rh4_OiSiUlcv2KthEqRgIz1dikIsp_zoYcmSlQyrulsFHeMkbNa6Gd9iCnqBnO-K/s320/codebg.gif); background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; background: rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; overflow-wrap: normal; word-wrap: normal;&quot;&gt; Add-AppPackage -Path ((Get-ChildItem -Path ((Get-Location).ProviderPath) -Filter *.msixbundle).FullName)  
&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://mickitblog.blogspot.com/feeds/785947431261663446/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mickitblog.blogspot.com/2021/12/installing-winget-via-powershell.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/785947431261663446'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/785947431261663446'/><link rel='alternate' type='text/html' href='http://mickitblog.blogspot.com/2021/12/installing-winget-via-powershell.html' title='Installing WinGet via PowerShell'/><author><name>Mick Pletcher</name><uri>http://www.blogger.com/profile/09597651323688418212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1GjVWF_81hun8PvhRSvbXBJHCYVoX_UJZbi7SbHgHEXQJ8An20_JaeeW8tAwDbyQAW4jpEb0H_eL4cOgwfX3Jx4hMBbD1vdmfjsk8w0c6TNCBnkvgxUMVn54cUbe3yQ/s151/396426_10151292562288888_1032319935_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159186316497589396.post-9079314594796797028</id><published>2021-11-19T14:19:00.004-06:00</published><updated>2021-11-19T14:19:57.338-06:00</updated><title type='text'>Administrator Reporting Tool</title><content type='html'>&lt;p&gt;This PowerShell tool queries AD for a list of machines in the specified administrative admin groups. The list is specified by modifying the script with the groups to be queried. The following example shows how to add groups to the query. When there are multiple groups, they can be divided off by using the pipe character between each group.&lt;/p&gt;&lt;p&gt;Where-Object {$_.MemberOf -match &#39;Admins|Domain Admins|System Admins|&#39;}&lt;/p&gt;&lt;p&gt;There is the parameter called $Days. This specifies how many days old the account needs to be so it is not displayed in the report anymore.&amp;nbsp;&lt;/p&gt;&lt;p&gt;I wrote this script so that it can easily be used with Orchestrator or as a scheduled task. It exits the script with an error code 0 if there is data to emailed along with the Write-Output statement that puts the list of users in the output of the program once exited. If there was no data to return, it exits with an error code 1 so that Orchestrator knows not to proceed with the email task.&amp;nbsp;&lt;/p&gt;&lt;p&gt;You can download the script from my &lt;a href=&quot;https://github.com/MicksITBlogs/PowerShell/blob/master/AdministratorReport.ps1&quot; target=&quot;_blank&quot;&gt;GiHub Site&lt;/a&gt;.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;

&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz1xGp9q86dTZmBT6Kgf4lTiCRnpB-883UDue4w0nS25otuiDMzqANNGCcUIMXUyHVEm0-djravLr2rh4_OiSiUlcv2KthEqRgIz1dikIsp_zoYcmSlQyrulsFHeMkbNa6Gd9iCnqBnO-K/s320/codebg.gif); background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; background: #f0f0f0; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; overflow-wrap: normal; word-wrap: normal;&quot;&gt; &amp;lt;#  
      .SYNOPSIS  
           Administrator Report  
        
      .DESCRIPTION  
           This tool is intended to keep staff informed of new administrator accounts. This script queries for a list of users in the specified administrator group(s). It then produces a list of the administrator users that got created within the specified number of days.   
        
      .PARAMETER Days  
           Number of days since the administrator account was created  
        
      .NOTES  
           ===========================================================================  
           Created with:     SAPIEN Technologies, Inc., PowerShell Studio 2021 v5.8.195  
           Created on:       11/9/2021 1:37 PM  
           Created by:       Mick Pletcher  
           Filename:         AdministratorReport.ps1  
           ===========================================================================  
 #&amp;gt;  
 Param  
 (  
      [ValidateNotNullOrEmpty()][int]$Days = 1  
 )  
   
 #Retrieves a list of users from AD and filters them by association with the specied security groups. The match can be associated with multiple groups separated with a pipe  
 #Example: Where-Object {$_.MemberOf -match &#39;|Domain Admins|System Admins|&#39;}  
 $Users = Get-ADUser -Filter * -Properties MemberOf | Where-Object {$_.MemberOf -match &#39;Super Admins|Domain Admins&#39;}  
 #Filter out all accounts that are older than the specified $Days  
 $Users | ForEach-Object {  
      If ((New-TimeSpan -Start ((Get-ADUser -Identity $_.SamAccountName -Properties whenCreated).whenCreated) -End (Get-Date)).Days -le $Days) {  
           $NewUsers += $_.Name  
      }  
        
 }  
 If (($NewUsers -ne $null) -and ($NewUsers -ne &#39;&#39;)) {  
      Write-Output $NewUsers  
 } Else {  
      Exit 1  
 }  
 Exit 0  
&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://mickitblog.blogspot.com/feeds/9079314594796797028/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mickitblog.blogspot.com/2021/11/administrator-reporting-tool.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/9079314594796797028'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/9079314594796797028'/><link rel='alternate' type='text/html' href='http://mickitblog.blogspot.com/2021/11/administrator-reporting-tool.html' title='Administrator Reporting Tool'/><author><name>Mick Pletcher</name><uri>http://www.blogger.com/profile/09597651323688418212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1GjVWF_81hun8PvhRSvbXBJHCYVoX_UJZbi7SbHgHEXQJ8An20_JaeeW8tAwDbyQAW4jpEb0H_eL4cOgwfX3Jx4hMBbD1vdmfjsk8w0c6TNCBnkvgxUMVn54cUbe3yQ/s151/396426_10151292562288888_1032319935_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159186316497589396.post-1060869196145155459</id><published>2021-10-13T09:48:00.007-05:00</published><updated>2021-10-13T14:29:29.155-05:00</updated><title type='text'>Installing Printers via ConfigMgr for Non-Admin Users</title><content type='html'>&lt;p&gt;KB5005652 resolved the &quot;PrintNightMare&quot; vulnerability, but it also brought many companies to a halt when it came to end-users installing printers if they did not have administrator privileges. During the time since the update, we had our help desk install printers for users on an as-needed basis. There was a workaround by setting the&amp;nbsp;&lt;span face=&quot;&amp;quot;Segoe UI&amp;quot;, &amp;quot;Segoe UI Web&amp;quot;, wf_segoe-ui_normal, &amp;quot;Helvetica Neue&amp;quot;, &amp;quot;BBAlpha Sans&amp;quot;, &amp;quot;S60 Sans&amp;quot;, Arial, sans-serif&quot; style=&quot;background-color: #f4f4f4; color: #1e1e1e; font-size: 16px;&quot;&gt;RestrictDriverInstallationToAdministrators&lt;/span&gt;&amp;nbsp;to 0 to override the fix, but this would have thwarted the security vulnerability.&amp;nbsp;&lt;/p&gt;&lt;p&gt;I came up with the fix to install printers using configuration manager since it can install them with a privileged account. The solution in my environment was to use PowerShell to query the print servers for a list of offices and printers in our scenario. After the office is selected, it displays a list of printers in that office for the user to select from. Once that printer is selected, it will check if the printer is already installed. If so, it will delete it and reinstall. If not, it will install the new printer. Finally, it will verify that the printer was successfully installed. I currently have the script read from a text file the list of print servers with the associated city location in CSV format. I did make a last-minute change where I hardcoded the locations into the object creation instead of using it from the text file. I will probably find a better way in the near future and update this with something like using Get-ADObject to get a list of the print servers, but will still need to find where the link to the associated city name is to use that method. For now, this is working great in our environment.&lt;/p&gt;&lt;p&gt;This has to be set up in configuration manager as a package advertisement with &lt;b&gt;Allow users to interact with this program&lt;/b&gt; checked. This allows users to install a printer on-demand through Software Center and rerun the package as many times as needed.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;b&gt;NOTE:&lt;/b&gt; One last important thing. This script was written for our environment. You will need PowerShell knowledge to modify this script to work in your environment. This is more of a primer to show you how I overcame the limitation in this corporate environment. The script will likely need to be greatly modified for some environments. The size of the company will also make a lot of difference in how this script needs to be modified. The firm I am at is roughly 500 people. A GUI interface may be preferential to some, which I may come back later and implement with PowerShell Studio.&amp;nbsp;&lt;/p&gt;&lt;p&gt;You can download the PowerShell script from my &lt;a href=&quot;https://github.com/MicksITBlogs/PowerShell/blob/master/PrinterInstaller.ps1&quot; target=&quot;_blank&quot;&gt;Github repository&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz1xGp9q86dTZmBT6Kgf4lTiCRnpB-883UDue4w0nS25otuiDMzqANNGCcUIMXUyHVEm0-djravLr2rh4_OiSiUlcv2KthEqRgIz1dikIsp_zoYcmSlQyrulsFHeMkbNa6Gd9iCnqBnO-K/s320/codebg.gif); background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; background: rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; overflow-wrap: normal; word-wrap: normal;&quot;&gt; &amp;lt;#  
      .SYNOPSIS  
           PrinterInstaller  
        
      .DESCRIPTION  
           This script is intended to be used in ConfigMgr as an applicatio advertisement in Software Center. This allows non-admin users to install printers allowing companies to keep the Microsoft print server patch in place. It nwill retrieve all printers from all print servers. It then prompts the user for the office. At that point, it will display a list of printers in that office for the user to select from. Finally, it will check if the printer is already installed. If it is, it will uninstall the printer and proceed to install it, otherwise it will install the printer.  
        
      .PARAMETER PrintServersFile  
           Name of the file which contains a list of print servers  
        
      .NOTES  
           ===========================================================================  
           Created with:     SAPIEN Technologies, Inc., PowerShell Studio 2021 v5.8.194  
           Created on:       10/12/2021 7:40 PM  
           Created by:       Mick Pletcher  
           Filename:         PrinterInstaller.ps1  
           ===========================================================================  
 #&amp;gt;  
   
 [CmdletBinding()]  
 Param  
 (  
      [ValidateNotNullOrEmpty()]$PrintServersFile = &#39;PrintServers.txt&#39;  
 )  
   
 Clear-Host  
 Write-Host &quot;Retrieving List of Offices...&quot;  
 #Create Printers array  
 $Printers = @()  
 #Get list of print servers that includes the print server and printer location  
 $PrintServers = Get-Content -Path ($PSScriptRoot + &#39;\&#39; + $PrintServersFile)  
 #Get list of all printers from within each print server  
 $PrintServers | ForEach-Object {  
   #Test if the print server is online before querying it  
   If ((Test-Connection -ComputerName $_.Split(&quot;,&quot;)[0] -Count 1 -Quiet) -eq $true) {  
     #Add all printer from the specified print server  
     $Query += Get-Printer -ComputerName $_.Split(&quot;,&quot;)[0]  
   }  
 }  
 #Create the object for each printer and add it to the $Printers array  
 $Query | ForEach-Object {  
      $object = New-Object PSObject  
      $object | Add-Member Noteproperty -Name PrinterName -Value $_.Name  
        $object | Add-Member Noteproperty -Name PrinterPort -Value $_.PortName  
      $object | Add-Member Noteproperty -Name PrintServer -Value $_.ComputerName  
      $object | Add-Member Noteproperty -Name DriverName -Value $_.DriverName  
      Switch ($_.ComputerName) {  
     &quot;Printer1&quot; { $object | Add-Member Noteproperty -Name Office -Value &quot;Austin&quot; }  
     &quot;Printer2&quot; { $object | Add-Member Noteproperty -Name Office -Value &quot;Birmingham&quot; }  
     &quot;Printer3&quot; { $object | Add-Member Noteproperty -Name Office -Value &quot;Chattanooga&quot; }  
     &quot;Printer4&quot; { $object | Add-Member Noteproperty -Name Office -Value &quot;Nashville&quot; }  
   }  
   #Add a floor value to the Floor object if the print server is in Nashville  
   If ($_.ComputerName -eq &#39;Printer4&#39;) {  
     $object | Add-Member Noteproperty -Name Floor -Value ($_.Name.Split(&quot;-&quot;)[1])  
   } else {  
     #Leave the floor object blank if it is any office other than Nashville  
     $object | Add-Member Noteproperty -Name Floor -Value &quot;&quot;  
   }  
   #Add the object to the $Printers array  
   $Printers += $object  
     
 }  
 #Sort the array by Office and then Floor  
 $Printers = $Printers | Sort-Object -Property Office, Floor  
 #Counter for selecting the office  
 $Count = 1  
 #Display each office with a number selection  
 $PrintServers | ForEach-Object {Write-Host ([string]$Count + &#39; - &#39; + $_.Split(&quot;,&quot;)[1]);$Count++}  
 #Prompt for a user selection of the office  
 $Selection = Read-Host -Prompt &quot;Select the office&quot;  
 #Get list of printers for selected office  
 $PrintersSelection = $Printers | Where-Object {$_.PrintServer -eq ($PrintServers[$Selection - 1].Split(&quot;,&quot;)[0])}  
 #printer counter  
 $Count = 1  
 Clear-Host  
 Write-Host  
 Write-Host &quot;Retrieving list of Printers...&quot;  
 #Display list of printers in the selected office  
 $PrintersSelection | ForEach-Object {Write-Host ([string]$Count + &#39; - &#39; + $_.PrinterName);$Count++}  
 #Prompt the user to select the printer  
 $Selection = Read-Host -Prompt &quot;Select the Printer&quot;  
 #Display the selected printer  
 $PrintersSelection[$Selection - 1]  
 #Check if the printer is installed and uninstall it if true  
 If ((Get-Printer -Name $PrintersSelection[$Selection - 1].PrinterName -ErrorAction SilentlyContinue) -ne $null) {  
      Remove-Printer -Name $PrintersSelection[$Selection - 1].PrinterName  
      Remove-PrinterPort -Name $PrintersSelection[$Selection - 1].PrinterPort  
 }  
 Write-Host  
 Write-Host (&#39;Installing Printer&#39; + [char]32 + $PrintersSelection[$Selection - 1].PrinterName + &#39;.....&#39;) -NoNewline  
 #Install the selected printer  
 Add-PrinterPort -Name $PrintersSelection[$Selection - 1].PrinterPort -PrinterHostAddress $PrintersSelection[$Selection - 1].PrinterPort  
 Add-Printer -Name $PrintersSelection[$Selection - 1].PrinterName -DriverName $PrintersSelection[$Selection - 1].DriverName -PortName $PrintersSelection[$Selection - 1].PrinterPort  
 #Verify the printer was installed  
 If ((Get-Printer -Name $PrintersSelection[$Selection - 1].PrinterName -ErrorAction SilentlyContinue) -ne $null) {  
      Write-Host &#39;success&#39; -ForegroundColor Yellow  
 } Else {  
      Write-Host &#39;failed&#39; -ForegroundColor Red  
 }  
   
&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://mickitblog.blogspot.com/feeds/1060869196145155459/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mickitblog.blogspot.com/2021/10/installing-printers-via-configmgr-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/1060869196145155459'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/1060869196145155459'/><link rel='alternate' type='text/html' href='http://mickitblog.blogspot.com/2021/10/installing-printers-via-configmgr-for.html' title='Installing Printers via ConfigMgr for Non-Admin Users'/><author><name>Mick Pletcher</name><uri>http://www.blogger.com/profile/09597651323688418212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1GjVWF_81hun8PvhRSvbXBJHCYVoX_UJZbi7SbHgHEXQJ8An20_JaeeW8tAwDbyQAW4jpEb0H_eL4cOgwfX3Jx4hMBbD1vdmfjsk8w0c6TNCBnkvgxUMVn54cUbe3yQ/s151/396426_10151292562288888_1032319935_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159186316497589396.post-6252264504439586077</id><published>2021-06-29T14:40:00.000-05:00</published><updated>2021-06-29T14:40:28.111-05:00</updated><title type='text'>PowerShell: Install Fonts</title><content type='html'>Font installation using PowerShell has changed since Windows 10 1909. The old way of doing it with PowerShell no longer works. This new script was &lt;a href=&quot;https://powers-hell.com/2020/06/09/installing-fonts-with-powershell-intune/&quot; target=&quot;_blank&quot;&gt;originally&lt;/a&gt; written by &lt;a href=&quot;https://powers-hell.com/2020/06/09/installing-fonts-with-powershell-intune/&quot; target=&quot;_blank&quot;&gt;Ben Reader&lt;/a&gt;&amp;nbsp;who is a fellow Microsoft MVP from Australia. I took the script and modified it by improving on user interface and file tweaks.&amp;nbsp;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;This script gets a list of all font files that exist in the same directory. It then parses through each font file getting the font name attribute at which point it copies the file to c:\windows\Fonts. Next, it registers the font by writing the font file name to&amp;nbsp;HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Fonts so that it will show up in a drop-down menu. The script also writes the status of each step to the screen so the person executing it knows if each font install is successful or not.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can download the script from my &lt;a href=&quot;https://github.com/MicksITBlogs/PowerShell/blob/master/InstallFonts.ps1&quot; target=&quot;_blank&quot;&gt;GitHub site&lt;/a&gt;.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;

&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz1xGp9q86dTZmBT6Kgf4lTiCRnpB-883UDue4w0nS25otuiDMzqANNGCcUIMXUyHVEm0-djravLr2rh4_OiSiUlcv2KthEqRgIz1dikIsp_zoYcmSlQyrulsFHeMkbNa6Gd9iCnqBnO-K/s320/codebg.gif); background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; background: #f0f0f0; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; overflow-wrap: normal; word-wrap: normal;&quot;&gt; &amp;lt;#  
      .SYNOPSIS  
           Install Open Text and True Type Fonts  
        
      .DESCRIPTION  
           This script will install OTF and TTF fonts that exist in the same directory as the script.  
        
      .NOTES  
           ===========================================================================  
           Created with:    SAPIEN Technologies, Inc., PowerShell Studio 2021 v5.8.187  
           Created on:      6/24/2021 9:36 AM  
           Created by:      Mick Pletcher  
           Filename:        InstallFonts.ps1  
           ===========================================================================  
 #&amp;gt;  
   
 &amp;lt;#  
      .SYNOPSIS  
           Install the font  
        
      .DESCRIPTION  
           This function will attempt to install the font by copying it to the c:\windows\fonts directory and then registering it in the registry. This also outputs the status of each step for easy tracking.   
        
      .PARAMETER FontFile  
           Name of the Font File to install  
        
      .EXAMPLE  
                     PS C:\&amp;gt; Install-Font -FontFile $value1  
        
      .NOTES  
           Additional information about the function.  
 #&amp;gt;  
 function Install-Font {  
      param  
      (  
           [Parameter(Mandatory = $true)][ValidateNotNullOrEmpty()][System.IO.FileInfo]$FontFile  
      )  
        
      #Get Font Name from the File&#39;s Extended Attributes  
      $oShell = new-object -com shell.application  
      $Folder = $oShell.namespace($FontFile.DirectoryName)  
      $Item = $Folder.Items().Item($FontFile.Name)  
      $FontName = $Folder.GetDetailsOf($Item, 21)  
      try {  
           switch ($FontFile.Extension) {  
                &quot;.ttf&quot; {$FontName = $FontName + [char]32 + &#39;(TrueType)&#39;}  
                &quot;.otf&quot; {$FontName = $FontName + [char]32 + &#39;(OpenType)&#39;}  
           }  
           $Copy = $true  
           Write-Host (&#39;Copying&#39; + [char]32 + $FontFile.Name + &#39;.....&#39;) -NoNewline  
           Copy-Item -Path $fontFile.FullName -Destination (&quot;C:\Windows\Fonts\&quot; + $FontFile.Name) -Force  
           #Test if font is copied over  
           If ((Test-Path (&quot;C:\Windows\Fonts\&quot; + $FontFile.Name)) -eq $true) {  
                Write-Host (&#39;Success&#39;) -Foreground Yellow  
           } else {  
                Write-Host (&#39;Failed&#39;) -ForegroundColor Red  
           }  
           $Copy = $false  
           #Test if font registry entry exists  
           If ((Get-ItemProperty -Name $FontName -Path &quot;HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Fonts&quot; -ErrorAction SilentlyContinue) -ne $null) {  
                #Test if the entry matches the font file name  
                If ((Get-ItemPropertyValue -Name $FontName -Path &quot;HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Fonts&quot;) -eq $FontFile.Name) {  
                     Write-Host (&#39;Adding&#39; + [char]32 + $FontName + [char]32 + &#39;to the registry.....&#39;) -NoNewline  
                     Write-Host (&#39;Success&#39;) -ForegroundColor Yellow  
                } else {  
                     $AddKey = $true  
                     Remove-ItemProperty -Name $FontName -Path &quot;HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Fonts&quot; -Force  
                     Write-Host (&#39;Adding&#39; + [char]32 + $FontName + [char]32 + &#39;to the registry.....&#39;) -NoNewline  
                     New-ItemProperty -Name $FontName -Path &quot;HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Fonts&quot; -PropertyType string -Value $FontFile.Name -Force -ErrorAction SilentlyContinue | Out-Null  
                     If ((Get-ItemPropertyValue -Name $FontName -Path &quot;HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Fonts&quot;) -eq $FontFile.Name) {  
                          Write-Host (&#39;Success&#39;) -ForegroundColor Yellow  
                     } else {  
                          Write-Host (&#39;Failed&#39;) -ForegroundColor Red  
                     }  
                     $AddKey = $false  
                }  
           } else {  
                $AddKey = $true  
                Write-Host (&#39;Adding&#39; + [char]32 + $FontName + [char]32 + &#39;to the registry.....&#39;) -NoNewline  
                New-ItemProperty -Name $FontName -Path &quot;HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Fonts&quot; -PropertyType string -Value $FontFile.Name -Force -ErrorAction SilentlyContinue | Out-Null  
                If ((Get-ItemPropertyValue -Name $FontName -Path &quot;HKLM:\Software\Microsoft\Windows NT\CurrentVersion\Fonts&quot;) -eq $FontFile.Name) {  
                     Write-Host (&#39;Success&#39;) -ForegroundColor Yellow  
                } else {  
                     Write-Host (&#39;Failed&#39;) -ForegroundColor Red  
                }  
                $AddKey = $false  
           }  
             
      } catch {  
           If ($Copy -eq $true) {  
                Write-Host (&#39;Failed&#39;) -ForegroundColor Red  
                $Copy = $false  
           }  
           If ($AddKey -eq $true) {  
                Write-Host (&#39;Failed&#39;) -ForegroundColor Red  
                $AddKey = $false  
           }  
           write-warning $_.exception.message  
      }  
      Write-Host  
 }  
   
 #Get a list of all font files relative to this script and parse through the list  
 foreach ($FontItem in (Get-ChildItem -Path $PSScriptRoot | Where-Object {  
                ($_.Name -like &#39;*.ttf&#39;) -or ($_.Name -like &#39;*.OTF&#39;)  
           })) {  
      Install-Font -FontFile $FontItem  
 }  
   
&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://mickitblog.blogspot.com/feeds/6252264504439586077/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mickitblog.blogspot.com/2021/06/powershell-install-fonts.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/6252264504439586077'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/6252264504439586077'/><link rel='alternate' type='text/html' href='http://mickitblog.blogspot.com/2021/06/powershell-install-fonts.html' title='PowerShell: Install Fonts'/><author><name>Mick Pletcher</name><uri>http://www.blogger.com/profile/09597651323688418212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1GjVWF_81hun8PvhRSvbXBJHCYVoX_UJZbi7SbHgHEXQJ8An20_JaeeW8tAwDbyQAW4jpEb0H_eL4cOgwfX3Jx4hMBbD1vdmfjsk8w0c6TNCBnkvgxUMVn54cUbe3yQ/s151/396426_10151292562288888_1032319935_n.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159186316497589396.post-6763992221909847781</id><published>2021-01-22T15:12:00.001-06:00</published><updated>2021-01-22T15:12:27.156-06:00</updated><title type='text'>Configuration Manager Message ID 11170 Error</title><content type='html'>I was in the process of pushing out the Microsoft Windows 10 20H2 upgrade when I had 23 systems that errored out. They reported the error shown below.&amp;nbsp;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3_052OlHrl9X8KWnhTcAaSpFlNpeARZ7iYhjL5GZmiYkWk-p4ypg54einiL42mdWTdNssxlQ4Kxbl5oj33xD3ROZvAFEaBKoor5-AkVw7gGYxJK5n8mosIzHWJ_ehpYW-Kb3QtRYZiL4/s1123/Screenshot+2021-01-22+150547.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;637&quot; data-original-width=&quot;1123&quot; height=&quot;364&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3_052OlHrl9X8KWnhTcAaSpFlNpeARZ7iYhjL5GZmiYkWk-p4ypg54einiL42mdWTdNssxlQ4Kxbl5oj33xD3ROZvAFEaBKoor5-AkVw7gGYxJK5n8mosIzHWJ_ehpYW-Kb3QtRYZiL4/w640-h364/Screenshot+2021-01-22+150547.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;After looking at the logs and at Software Center on the target machine, I found the target machine was not seeing the deployment under Operating Systems. The fix was to reinstall the client on the target machine. Once the reinstall completed and the client synchronized with the ConfigMgr server, the deployment appeared in Software Center and successfully completed.&amp;nbsp;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mickitblog.blogspot.com/feeds/6763992221909847781/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mickitblog.blogspot.com/2021/01/configuration-manager-message-id-11170.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/6763992221909847781'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/6763992221909847781'/><link rel='alternate' type='text/html' href='http://mickitblog.blogspot.com/2021/01/configuration-manager-message-id-11170.html' title='Configuration Manager Message ID 11170 Error'/><author><name>Mick Pletcher</name><uri>http://www.blogger.com/profile/09597651323688418212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1GjVWF_81hun8PvhRSvbXBJHCYVoX_UJZbi7SbHgHEXQJ8An20_JaeeW8tAwDbyQAW4jpEb0H_eL4cOgwfX3Jx4hMBbD1vdmfjsk8w0c6TNCBnkvgxUMVn54cUbe3yQ/s151/396426_10151292562288888_1032319935_n.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3_052OlHrl9X8KWnhTcAaSpFlNpeARZ7iYhjL5GZmiYkWk-p4ypg54einiL42mdWTdNssxlQ4Kxbl5oj33xD3ROZvAFEaBKoor5-AkVw7gGYxJK5n8mosIzHWJ_ehpYW-Kb3QtRYZiL4/s72-w640-h364-c/Screenshot+2021-01-22+150547.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159186316497589396.post-6237857262783060716</id><published>2021-01-11T17:02:00.002-06:00</published><updated>2021-01-19T16:06:30.289-06:00</updated><title type='text'>Automating the Deletion of Windows.old</title><content type='html'>&lt;p&gt;It is the beginning of 2021 and my first project for the new year is upgrading all systems to Windows 10 20H2. At the end of the upgrades comes the cleanup and there is no clean way to do this for system admins. Cleanmgr.exe is now deprecated as of Windows 10 2004. There is not a PowerShell option for controlling storage sense. Cleanmgr.exe /AUTOCLEAN would open up cleanmgr.exe and then freeze. It never deleted the folder and was stuck at zero CPU usage. I also tried using PSEXEC to execute it with the same results. Another suggestion was using task scheduler. I also tried using Dism.exe /online /Cleanup-Image /StartComponentCleanup. The Windows.old folder was still present. The next option is to delete the folder. Here is a pic of the failure to clean up the Windows.old folder using a domain admin account and cmd.exe run as administrator.&lt;/p&gt;&lt;p&gt;NOTE: There is an issue we ran into when someone had a USB drive connected. The system connected to the wrong drive. and installed the SMSTaskSequence on that drive instead of the bootable C: drive. This caused the system to reboot constantly because it then did not see the Windows.old directory to delete. I fixed this by adding logic that looked for the Windows.old directory. The new code is below&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHalkFLoocs2T_WycvZn9lq7Awu8W8si8jwabLqDUCUEMD37a46GDWpLSjFBVARABkBRh7zNNLe9j7Z8XKPywH-zKRUQmakjIrVid3KvEPpkdgWN2KLUdphlJejoodcVBNTUI3Z5zrxrM/s980/dism.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;708&quot; data-original-width=&quot;980&quot; height=&quot;462&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHalkFLoocs2T_WycvZn9lq7Awu8W8si8jwabLqDUCUEMD37a46GDWpLSjFBVARABkBRh7zNNLe9j7Z8XKPywH-zKRUQmakjIrVid3KvEPpkdgWN2KLUdphlJejoodcVBNTUI3Z5zrxrM/w640-h462/dism.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;NOTE:&lt;/span&gt;&lt;/b&gt; Once this folder has been deleted, Windows cannot be reverted back to the previous version.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Once the upgrade has taken place, the Windows.old folder is present. It typically takes up 15+ GB of space. The upgraded OS is still actively using some files in the directory as I learned while exploring how to delete them. I found the files being used were drivers. This prevents you from deleting it while the OS is in memory. The alternative is to load WinPE so the OS is not in memory thereby freeing up the directory for deletion. Once the directory is deleted in WinPE and the system reboots, the OS reassociates the drivers it was using in the Windows.old directory to the Windows directory.&lt;/p&gt;&lt;p&gt;I first tried using PowerShell to delete the directory and there was a constant problem. PowerShell could not delete all files and directories, no matter what I tried. I consistently got the message &quot;No mapping between account names and security IDs was done.&quot; Next, I tried RMDIR and it worked perfectly. I was able to use PowerShell to both find the drive in the WinPE environment and then execute the RMDIR command to delete the Windows.old directory on that drive. I tried this as a one-liner, but it was hit and miss with the RMDIR accepting the piped output instead of a variable. I found storing the path to the Windows.old directory in a variable was much more reliable. Here is the two-line code below:&lt;/p&gt;&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz1xGp9q86dTZmBT6Kgf4lTiCRnpB-883UDue4w0nS25otuiDMzqANNGCcUIMXUyHVEm0-djravLr2rh4_OiSiUlcv2KthEqRgIz1dikIsp_zoYcmSlQyrulsFHeMkbNa6Gd9iCnqBnO-K/s320/codebg.gif); background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; background: rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; overflow-wrap: normal; word-wrap: normal;&quot;&gt;$Drive = (Get-Partition | Where-Object {((Test-Path ($_.DriveLetter + &#39;:\Windows.old&#39;)) -eq $True)}).DriveLetter
If ((Test-Path ($Drive + &#39;:\Windows.old&#39;)) -eq $true) {
    $Directory = $Drive + &#39;:\Windows.old&#39;
    cmd.exe /c rmdir /S /Q $Directory
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Here is a screenshot of the task sequence I used to deploy to the systems. The first restart is to load WinPE, the second sequence is the above PowerShell script, and the third sequence reboots the system back into the installed OS.&lt;/p&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWuPueSu8c5CHl-1gRgyLAvPNVPkw89HmfWN8FBbgkA50m1Ft5uff2eagTDGu69ratizcLgtc539tUOg1d7O7eZkCAd9JryxhdDZIp0h5mYcfCtQ5dH5vtHetICD8wL4SsMz8Y4cFd420/s949/windowsold.jpg&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;778&quot; data-original-width=&quot;949&quot; height=&quot;524&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWuPueSu8c5CHl-1gRgyLAvPNVPkw89HmfWN8FBbgkA50m1Ft5uff2eagTDGu69ratizcLgtc539tUOg1d7O7eZkCAd9JryxhdDZIp0h5mYcfCtQ5dH5vtHetICD8wL4SsMz8Y4cFd420/w640-h524/windowsold.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://mickitblog.blogspot.com/feeds/6237857262783060716/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mickitblog.blogspot.com/2021/01/automating-deletion-of-windowsold.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/6237857262783060716'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/6237857262783060716'/><link rel='alternate' type='text/html' href='http://mickitblog.blogspot.com/2021/01/automating-deletion-of-windowsold.html' title='Automating the Deletion of Windows.old'/><author><name>Mick Pletcher</name><uri>http://www.blogger.com/profile/09597651323688418212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1GjVWF_81hun8PvhRSvbXBJHCYVoX_UJZbi7SbHgHEXQJ8An20_JaeeW8tAwDbyQAW4jpEb0H_eL4cOgwfX3Jx4hMBbD1vdmfjsk8w0c6TNCBnkvgxUMVn54cUbe3yQ/s151/396426_10151292562288888_1032319935_n.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHalkFLoocs2T_WycvZn9lq7Awu8W8si8jwabLqDUCUEMD37a46GDWpLSjFBVARABkBRh7zNNLe9j7Z8XKPywH-zKRUQmakjIrVid3KvEPpkdgWN2KLUdphlJejoodcVBNTUI3Z5zrxrM/s72-w640-h462-c/dism.jpg" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159186316497589396.post-8742703866261090026</id><published>2020-09-25T14:32:00.001-05:00</published><updated>2020-09-25T14:32:21.674-05:00</updated><title type='text'>Check Boot Environment for BIOS or UEFI</title><content type='html'>&lt;p&gt;One of my recent projects is to convert our remaining legacy systems from BIOS to UEFI. While setting up the task sequence, I needed to be able to test the system to make sure it was not already UEFI so the task sequence would end if it was.&amp;nbsp;&lt;/p&gt;&lt;p&gt;The PowerShell script reads the setupact.log file and extracts if it is configured as BIOS or UEFI. I have included an unknown message in the event the log file does not exist or is inaccessible, which is what I encountered on one machine. For setting it up in a Configuration Manager task sequence, I set the sequence to look for a return code of 0, else it will return either a 1 or 2, which will fail the task sequence, and allow the admin to know why it failed from the console with the error code being returned.&lt;/p&gt;&lt;p&gt;You can download the script from my &lt;a href=&quot;https://github.com/MicksITBlogs/PowerShell/blob/master/BootEnvironment.ps1&quot; target=&quot;_blank&quot;&gt;GitHub site&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz1xGp9q86dTZmBT6Kgf4lTiCRnpB-883UDue4w0nS25otuiDMzqANNGCcUIMXUyHVEm0-djravLr2rh4_OiSiUlcv2KthEqRgIz1dikIsp_zoYcmSlQyrulsFHeMkbNa6Gd9iCnqBnO-K/s320/codebg.gif); background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; background: #f0f0f0; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; overflow-wrap: normal; word-wrap: normal;&quot;&gt; &amp;lt;#  
      .SYNOPSIS  
           Check Boot Environment  
        
      .DESCRIPTION  
           This script reads the setupact.log file to determine if the system is configured for BIOS or UEFI.   
        
      .NOTES  
           ===========================================================================  
           Created with:     SAPIEN Technologies, Inc., PowerShell Studio 2017 v5.4.142  
           Created on:       9/25/2020 11:59 AM  
           Created by:       Mick Pletcher  
           Filename:         BootEnvironment.ps1  
           ===========================================================================  
 #&amp;gt;  
   
 Try {  
      $Output = (Get-Content -Path (((Get-ChildItem -Path ($env:windir + &#39;\Panther&#39;) -Recurse -Filter setupact.log -ErrorAction SilentlyContinue)[0]).FullName) -ErrorAction SilentlyContinue | Where-Object {$_ -like &quot;*Detected boot environment*&quot;}).Replace(&quot;Detected boot environment:&quot;, &quot;~&quot;).Split(&quot;~&quot;)[1].Trim()  
      If ($Output -eq &#39;BIOS&#39;) {  
           Write-Output &#39;BIOS&#39;  
           Exit 0  
      } elseif ($Output -eq &#39;UEFI&#39;) {  
           Write-Output &#39;UEFI&#39;  
           Exit 1  
      }  
 } Catch {  
      Write-Output &#39;Unknown&#39;  
      Exit 2  
 }  
   
&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://mickitblog.blogspot.com/feeds/8742703866261090026/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mickitblog.blogspot.com/2020/09/check-boot-environment-for-bios-or-uefi.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/8742703866261090026'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/8742703866261090026'/><link rel='alternate' type='text/html' href='http://mickitblog.blogspot.com/2020/09/check-boot-environment-for-bios-or-uefi.html' title='Check Boot Environment for BIOS or UEFI'/><author><name>Mick Pletcher</name><uri>http://www.blogger.com/profile/09597651323688418212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1GjVWF_81hun8PvhRSvbXBJHCYVoX_UJZbi7SbHgHEXQJ8An20_JaeeW8tAwDbyQAW4jpEb0H_eL4cOgwfX3Jx4hMBbD1vdmfjsk8w0c6TNCBnkvgxUMVn54cUbe3yQ/s151/396426_10151292562288888_1032319935_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159186316497589396.post-7781915638839090664</id><published>2020-09-24T10:57:00.002-05:00</published><updated>2020-09-24T10:57:36.545-05:00</updated><title type='text'>Bitlocker Non-Compliance Reporting</title><content type='html'>&lt;p&gt;As part of the suite of security tools I am writing, this will query the configuration manager SQL database for a list of machines that are not Bitlocker encrypted. There are reports in the configuration manager for this, but not everyone in my organization has access to the configuration manager console, and we wanted a detailed report sent out on a regular basis so that it is in their mailbox with high importance, which is also not available through ConfigMgr.&amp;nbsp;&lt;/p&gt;&lt;p&gt;This tool was written to include the computer name, model, chassis, drive letter, bitlocker status, last hardware inventory scan, and last logon time. The last hardware scan and last logon time give the admins an idea as to the accuracy of the system being reported. The tool was written so that it can be used with Azure Automation or Orchestrator, and even with a scheduled task if needed. The output is formatted for a clean appearance in an outlook email.&amp;nbsp;&lt;/p&gt;&lt;p&gt;You can download the script from my &lt;a href=&quot;https://github.com/MicksITBlogs/PowerShell/blob/master/BitlockerEncryptionReporting.ps1&quot; target=&quot;_blank&quot;&gt;GitHub site&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;

&lt;pre style=&quot;background-attachment: initial; background-clip: initial; background-color: #f0f0f0; background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz1xGp9q86dTZmBT6Kgf4lTiCRnpB-883UDue4w0nS25otuiDMzqANNGCcUIMXUyHVEm0-djravLr2rh4_OiSiUlcv2KthEqRgIz1dikIsp_zoYcmSlQyrulsFHeMkbNa6Gd9iCnqBnO-K/s320/codebg.gif); background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; background: #f0f0f0; border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; overflow-wrap: normal; word-wrap: normal;&quot;&gt; &amp;lt;#  
      .SYNOPSIS  
           Bitlocker Encryption Reporting  
        
      .DESCRIPTION  
           This script queries the Configuration Manager SQL database for a list of machines that are not Bitlocker Encrypted. It is limited to non-desktop chassis, which can be changed by modifying the SQL query. The script is designed to output the data so that it can be used with Orchestrator, Azure Automation, or a scheduled task.  
        
      .PARAMETER SQLServer  
           Name of the SQL server  
        
      .PARAMETER SQLDatabase  
           Name of the SQL database  
        
      .NOTES  
           ===========================================================================  
           Created with:    SAPIEN Technologies, Inc., PowerShell Studio 2017 v5.4.142  
           Created on:      9/21/2020 3:35 PM  
           Created by:      Mick Pletcher  
           Filename:        BitlockerEncryptionReporting.ps1  
           ===========================================================================  
 #&amp;gt;  
 [CmdletBinding()]  
 param  
 (  
      [ValidateNotNullOrEmpty()]  
      [string]$SQLServer,  
      [ValidateNotNullOrEmpty()]  
      [string]$SQLDatabase
 )  
   
 $Query = &quot;SELECT ResultTableName FROM dbo.v_Collections&quot;  
 $Collection = Invoke-Sqlcmd -ServerInstance $SQLServer -Database $SQLDatabase -Query $Query  
 #SQL query to retrieve the list of machines  
 $Query = &quot;SELECT DISTINCT Name as ComputerName, dbo.Computer_System_DATA.Model00 AS Model, dbo.System_Enclosure_DATA.ChassisTypes00 AS Chassis, dbo.ENCRYPTABLE_VOLUME_DATA.DriveLetter00 AS DriveLetter, ProtectionStatus00 AS BitlockerStatus, LastHardwareScan, ADLastLogonTime AS LastLogonTime FROM dbo.Computer_System_DATA INNER JOIN dbo.ENCRYPTABLE_VOLUME_DATA ON dbo.Computer_System_DATA.MachineID = dbo.ENCRYPTABLE_VOLUME_DATA.MachineID INNER JOIN dbo.v_GS_ENCRYPTABLE_VOLUME ON dbo.v_GS_ENCRYPTABLE_VOLUME.ResourceID = dbo.ENCRYPTABLE_VOLUME_DATA.MachineID INNER JOIN dbo._RES_COLL_SMS00001 ON dbo.ENCRYPTABLE_VOLUME_DATA.MachineID = dbo._RES_COLL_SMS00001.MachineID INNER JOIN dbo.System_Enclosure_DATA ON dbo._RES_COLL_SMS00001.MachineID = dbo.System_Enclosure_DATA.MachineID INNER JOIN dbo.v_GS_VOLUME ON dbo.System_Enclosure_DATA.MachineID = dbo.v_GS_VOLUME.ResourceID WHERE (((dbo.System_Enclosure_DATA.ChassisTypes00 = 8) OR (dbo.System_Enclosure_DATA.ChassisTypes00 = 9) OR (dbo.System_Enclosure_DATA.ChassisTypes00 = 10) OR (dbo.System_Enclosure_DATA.ChassisTypes00 = 12) OR (dbo.System_Enclosure_DATA.ChassisTypes00 = 14) OR (dbo.System_Enclosure_DATA.ChassisTypes00 = 31)) AND (dbo.ENCRYPTABLE_VOLUME_DATA.DriveLetter00 = &#39;C:&#39;) AND (dbo.ENCRYPTABLE_VOLUME_DATA.ProtectionStatus00 = 0)) ORDER BY Name&quot;  
 $Report = Invoke-Sqlcmd -ServerInstance $SQLServer -Database $SQLDatabase -Query $Query  
 #If the report has no machines, then exit this script with an error code 1 so that the automation tool the link will not continue to the email task  
 If ($Report -ne $null) {  
      $Array = @()  
      foreach ($Item in $Report) {  
           $SysObj = New-Object -TypeName System.Management.Automation.PSObject  
           $SysObj | Add-Member -MemberType NoteProperty -Name ComputerName -Value $Item.ComputerName  
           $SysObj | Add-Member -MemberType NoteProperty -Name Model -Value $Item.Model  
           $SysObj | Add-Member -MemberType NoteProperty -Name Chassis -Value $Item.Chassis  
           $SysObj | Add-Member -MemberType NoteProperty -Name DriveLetter -Value $Item.DriveLetter  
           $SysObj | Add-Member -MemberType NoteProperty -Name BitlockerStatus -Value $Item.BitlockerStatus  
           $SysObj | Add-Member -MemberType NoteProperty -Name LastHardwareScan -Value $Item.LastHardwareScan  
           $SysObj | Add-Member -MemberType NoteProperty -Name LastLogonTime -Value $Item.LastLogonTime  
           $Array += $SysObj  
      }  
      #Bitlocker reporting fields from the query  
      $Fields = @(&quot;Computer Name&quot;, &quot;Model&quot;, &quot;Chassis&quot;, &quot;Drive Letter&quot;, &quot;Bitlocker Status&quot;, &quot;Last Hardware Scan&quot;, &quot;Last Logon Time&quot;)  
      #Title row  
      $Output = ($Fields[0] + [char]9 + [char]9 + $Fields[1] + [char]9 + [char]9 + [char]9 + [char]9 + $Fields[2] + [char]9 + [char]9 + $Fields[3] + [char]9 + $Fields[4] + [char]9 + [char]9 + $Fields[5] + [char]9 + $Fields[6] + [char]13)  
      #Add each entry while formatting the computername column as to the width of the computername  
      foreach ($Item in $Array) {  
           If ($Item.ComputerName.Length -le 3) {  
                $ComputerName = $Item.ComputerName + [char]9 + [char]9 + [char]9 + [char]9 + [char]9  
           } elseif ($Item.ComputerName.Length -le 7) {  
                $ComputerName = $Item.ComputerName + [char]9 + [char]9 + [char]9 + [char]9  
           } elseif ($Item.ComputerName.Length -le 11) {  
                $ComputerName = $Item.ComputerName + [char]9 + [char]9 + [char]9  
           } elseif ($Item.ComputerName.Length -le 15) {  
                $ComputerName = $Item.ComputerName + [char]9 + [char]9  
           } else {  
                $ComputerName = $Item.ComputerName + [char]9  
           }  
           $Output += $ComputerName + $Item.Model + [char]9 + [char]9 + [char]9 + $Item.Chassis + [char]9 + [char]9 + $Item.DriveLetter + [char]9 + [char]9 + $Item.BitlockerStatus + [char]9 + [char]9 + [char]9 + $Item.LastHardwareScan + [char]9 + $Item.LastLogonTime + [char]13  
      }  
      #Write the output so it can be collected from the automation tool  
      Write-Output -InputObject $Output  
 } else {  
      Exit 1  
 }  
   
&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://mickitblog.blogspot.com/feeds/7781915638839090664/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mickitblog.blogspot.com/2020/09/bitlocker-non-compliance-reporting.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/7781915638839090664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/7781915638839090664'/><link rel='alternate' type='text/html' href='http://mickitblog.blogspot.com/2020/09/bitlocker-non-compliance-reporting.html' title='Bitlocker Non-Compliance Reporting'/><author><name>Mick Pletcher</name><uri>http://www.blogger.com/profile/09597651323688418212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1GjVWF_81hun8PvhRSvbXBJHCYVoX_UJZbi7SbHgHEXQJ8An20_JaeeW8tAwDbyQAW4jpEb0H_eL4cOgwfX3Jx4hMBbD1vdmfjsk8w0c6TNCBnkvgxUMVn54cUbe3yQ/s151/396426_10151292562288888_1032319935_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159186316497589396.post-8862981152695205213</id><published>2020-09-15T14:37:00.000-05:00</published><updated>2020-09-15T14:37:33.531-05:00</updated><title type='text'>Preventing Windows 10 Apps from Reappearing after an In-Place or Feature Upgrade</title><content type='html'>In the imaging process I devised, most of the Windows 10 Built-In apps, such as mail and maps, are removed. My company uses the SAC edition of Windows 10 enterprise. This requires us to perform an in-place upgrade every 6 months. In order to prevent the built-in apps from reappearing, you can add specific registry keys that permanently deprovision the apps.&amp;nbsp;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The first thing you will need to do is to get a list of the apps you want to deprovision. To do so, execute the following PowerShell one-liner to get a list of the apps with the display name on the right with the associated package name on the left. The package name is what will be needed.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;

&lt;pre style=&quot;background: rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; overflow-wrap: normal;&quot;&gt; Get-AppxProvisionedPackage -Online | Select DisplayName, PackageName | Sort-Object -Property DisplayName | Export-Csv -Path Apps.txt -Force -Encoding UTF8 -NoTypeInformation  
&lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
It is best to edit the CSV file in excel. Once you open the generated text file up, delete those items you do &lt;span style=&quot;color: red;&quot;&gt;NOT&lt;/span&gt; want the OS to remove, and then delete the DisplayName column. The CSV file is now ready to be used with the PowerShell script. You will need to rerun the above PowerShell script each time an OS upgrade is available and has been installed to get any new additions.&amp;nbsp;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The script will read the contents of the text file and then adds those as a registry key located under&amp;nbsp;HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned. You can find out more information on the registry keys and how they work &lt;a href=&quot;https://docs.microsoft.com/en-us/windows/application-management/remove-provisioned-apps-during-update#registry-keys-for-provisioned-apps&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The following script will only need to be executed once. You can download it from my &lt;a href=&quot;https://github.com/MicksITBlogs/PowerShell/blob/master/Windows10AppDeprovisioning.ps1&quot; target=&quot;_blank&quot;&gt;GitHub site&lt;/a&gt;.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;

&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz1xGp9q86dTZmBT6Kgf4lTiCRnpB-883UDue4w0nS25otuiDMzqANNGCcUIMXUyHVEm0-djravLr2rh4_OiSiUlcv2KthEqRgIz1dikIsp_zoYcmSlQyrulsFHeMkbNa6Gd9iCnqBnO-K/s320/codebg.gif); background: rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; overflow-wrap: normal;&quot;&gt; &amp;lt;#  
      .SYNOPSIS  
           Deprovision Specified Windows 10 Apps  
        
      .DESCRIPTION  
           This script will add the appropriate registry keys to deprovision the built-in Windows 10 applications specified in the associated text file, or hardcoded in the script.  
        
      .PARAMETER AppListFile  
           File containing list of Windows 10 files to deprovision  
        
      .NOTES  
           ===========================================================================  
           Created with:     SAPIEN Technologies, Inc., PowerShell Studio 2017 v5.4.142  
           Created on:       9/15/2020 9:56 AM  
           Created by:       Mick Pletcher  
           Filename:         Windows10AppDeprovisioning.ps1  
           ===========================================================================  
 #&amp;gt;  
   
 [CmdletBinding()]  
   
 param  
 (  
      [string]$AppListFile  
 )  
   
 #Get list of Windows 10 Applications to uninstall from text file  
 $Applications = Get-Content -Path $AppListFile  
 #Deprovisioned Registry Key  
 $RegKey = &#39;REGISTRY::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Appx\AppxAllUserStore\Deprovisioned&#39;  
 #Create deprovisioned registry key if it does not exist  
 If (!(Test-Path $RegKey)) {  
      New-Item -Path $RegKey -Force | Out-Null  
 }  
 #Add list of Apps from the imported text file to the deprovisioned registry key  
 foreach ($App in $Applications) {  
      #Install registry key if it does not exist  
      If (!(Test-Path ($RegKey + &#39;\&#39; + $App))) {  
           New-Item -Path ($RegKey + &#39;\&#39; + $App) -Force | Out-Null  
      }  
 }  
   
&lt;/code&gt;&lt;/pre&gt;</content><link rel='replies' type='application/atom+xml' href='http://mickitblog.blogspot.com/feeds/8862981152695205213/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mickitblog.blogspot.com/2020/09/preventing-windows-10-apps-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/8862981152695205213'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/8862981152695205213'/><link rel='alternate' type='text/html' href='http://mickitblog.blogspot.com/2020/09/preventing-windows-10-apps-from.html' title='Preventing Windows 10 Apps from Reappearing after an In-Place or Feature Upgrade'/><author><name>Mick Pletcher</name><uri>http://www.blogger.com/profile/09597651323688418212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1GjVWF_81hun8PvhRSvbXBJHCYVoX_UJZbi7SbHgHEXQJ8An20_JaeeW8tAwDbyQAW4jpEb0H_eL4cOgwfX3Jx4hMBbD1vdmfjsk8w0c6TNCBnkvgxUMVn54cUbe3yQ/s151/396426_10151292562288888_1032319935_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6159186316497589396.post-5261703651182228921</id><published>2020-09-09T11:40:00.000-05:00</published><updated>2020-09-09T11:40:39.331-05:00</updated><title type='text'>Remotely Pushing Windows Updates via Command Line to Windows 10 Machines</title><content type='html'>&lt;p&gt;Normally, windows updates are pushed to machines using Configuration Manager in an enterprise environment. There are occasions though when they must manually be pushed, such as when a system continues to fail via ConfigMgr and troubleshooting is required. The first tool I use is the &lt;a href=&quot;https://www.powershellgallery.com/packages/PSWindowsUpdate/2.2.0.2&quot; target=&quot;_blank&quot;&gt;PSWindowsUpdate PowerShell module&lt;/a&gt;. This allows me to remotely push updates via PowerShell and &lt;a href=&quot;https://docs.microsoft.com/en-us/sysinternals/downloads/psexec&quot; target=&quot;_blank&quot;&gt;PSEXEC&lt;/a&gt;, in which I can watch the results.&amp;nbsp;&lt;/p&gt;&lt;p&gt;To use the PSWindowsUpdate module, it must be installed first. I do so by installing the module on all machines during the build process, but it can also be pushed through ConfigMgr or you can use PSEXEC.exe to install it. The command line I use is:&lt;/p&gt;&lt;div&gt;&lt;pre style=&quot;background: rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; overflow-wrap: normal;&quot;&gt; powershell.exe -executionpolicy bypass -command &quot;&amp;amp;{Install-Module -Name PSWindowsUpdate -Force -Confirm:$false}&quot;  
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;br /&gt;&lt;div&gt;Once it is installed on the remote machine, I use the following PowerShell one-liner in the configuration manager Scripts section to remotely execute it.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;pre style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjz1xGp9q86dTZmBT6Kgf4lTiCRnpB-883UDue4w0nS25otuiDMzqANNGCcUIMXUyHVEm0-djravLr2rh4_OiSiUlcv2KthEqRgIz1dikIsp_zoYcmSlQyrulsFHeMkbNa6Gd9iCnqBnO-K/s320/codebg.gif); background: rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; overflow-wrap: normal;&quot;&gt; Install-WindowsUpdate -IgnoreReboot -AcceptAll;Start-Process -FilePath ($env:windir + &#39;\system32\UsoClient.exe&#39;) -ArgumentList &#39;ScanInstallWait StartInstall&#39;  
&lt;/code&gt;&lt;/pre&gt;
The issue I have seen with just using the PSWindowsUpdate module with 1903 and later versions of Windows 10 is that it will trigger the updates to download, but will not always install them, especially feature updates. The UsoClient.exe will trigger the updates to install. This command-line executable is the same as going to the Check for Windows Updates screen and clicking the button to install updates. You can find more info on UsoClient &lt;a href=&quot;https://www.urtech.ca/2018/11/usoclient-documentation-switches/&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt;.&amp;nbsp;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you are trying to get a feature update to install remotely, you will need to execute UsoClient.exe&amp;nbsp;ScanInstallWait StartInstall at least a couple of times before it starts to install after the update has been downloaded.&amp;nbsp;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mickitblog.blogspot.com/feeds/5261703651182228921/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mickitblog.blogspot.com/2020/09/remotely-pushing-windows-updates-via.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/5261703651182228921'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6159186316497589396/posts/default/5261703651182228921'/><link rel='alternate' type='text/html' href='http://mickitblog.blogspot.com/2020/09/remotely-pushing-windows-updates-via.html' title='Remotely Pushing Windows Updates via Command Line to Windows 10 Machines'/><author><name>Mick Pletcher</name><uri>http://www.blogger.com/profile/09597651323688418212</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1GjVWF_81hun8PvhRSvbXBJHCYVoX_UJZbi7SbHgHEXQJ8An20_JaeeW8tAwDbyQAW4jpEb0H_eL4cOgwfX3Jx4hMBbD1vdmfjsk8w0c6TNCBnkvgxUMVn54cUbe3yQ/s151/396426_10151292562288888_1032319935_n.jpg'/></author><thr:total>0</thr:total></entry></feed>