<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Powershell on Jon's Notes</title><link>https://4c4806b4.configjon-blog.pages.dev/category/powershell/</link><description>Recent content in Powershell on Jon's Notes</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Fri, 11 Sep 2020 00:00:00 +0000</lastBuildDate><atom:link href="https://4c4806b4.configjon-blog.pages.dev/category/powershell/index.xml" rel="self" type="application/rss+xml"/><item><title>Dell BIOS Password Management - WMI</title><link>https://4c4806b4.configjon-blog.pages.dev/dell-bios-password-management-wmi/</link><pubDate>Fri, 11 Sep 2020 00:00:00 +0000</pubDate><guid>https://4c4806b4.configjon-blog.pages.dev/dell-bios-password-management-wmi/</guid><description>&lt;p&gt;Earlier this year, I wrote about how to &lt;strong&gt;&lt;a href="https://4c4806b4.configjon-blog.pages.dev/dell-bios-settings-management/"&gt;manage Dell BIOS password&lt;/a&gt;&lt;/strong&gt;&lt;a href="https://4c4806b4.configjon-blog.pages.dev/dell-bios-settings-management/"&gt;&lt;strong&gt;s&lt;/strong&gt;&lt;/a&gt; using PowerShell. The method described in that post uses the &lt;a href="https://4c4806b4.configjon-blog.pages.dev/working-with-the-dell-command-powershell-provider/"&gt;&lt;strong&gt;DellBIOSProvider&lt;/strong&gt;&lt;/a&gt; PowerShell module. This method works, but I was not completely satisfied with it, as the PowerShell module needs to be downloaded and installed on every system the script runs on.&lt;/p&gt;
&lt;p&gt;Thankfully, Dell recently released a &lt;a href="https://downloads.dell.com/manuals/common/dell-agentless-client-manageability.pdf"&gt;&lt;strong&gt;technical whitepaper&lt;/strong&gt;&lt;/a&gt; documenting WMI classes that can be used to directly modify BIOS settings without needing an outside program or PowerShell module. This allowed me to create a new version of the Dell BIOS Settings Management script that does not require any additional content to function.&lt;/p&gt;</description></item><item><title>Dell BIOS Settings Management - WMI</title><link>https://4c4806b4.configjon-blog.pages.dev/dell-bios-settings-management-wmi/</link><pubDate>Fri, 11 Sep 2020 00:00:00 +0000</pubDate><guid>https://4c4806b4.configjon-blog.pages.dev/dell-bios-settings-management-wmi/</guid><description>&lt;p&gt;Earlier this year, I wrote about how to &lt;a href="https://4c4806b4.configjon-blog.pages.dev/dell-bios-settings-management/"&gt;&lt;strong&gt;manage Dell BIOS settings&lt;/strong&gt;&lt;/a&gt; using PowerShell. The method described in that post uses the &lt;a href="https://4c4806b4.configjon-blog.pages.dev/working-with-the-dell-command-powershell-provider/"&gt;&lt;strong&gt;DellBIOSProvider&lt;/strong&gt;&lt;/a&gt; PowerShell module. This method works, but I was not completely satisfied with it, as the PowerShell module needs to be downloaded and installed on every system the script runs on.&lt;/p&gt;
&lt;p&gt;Thankfully, Dell recently released a &lt;a href="https://downloads.dell.com/manuals/common/dell-agentless-client-manageability.pdf"&gt;&lt;strong&gt;technical whitepaper&lt;/strong&gt;&lt;/a&gt; documenting WMI classes that can be used to directly modify BIOS settings without needing an outside program or PowerShell module. This allowed me to create a new version of the Dell BIOS Settings Management script that does not require any additional content to function.&lt;/p&gt;</description></item><item><title>Installing the HP Client Management Script Library</title><link>https://4c4806b4.configjon-blog.pages.dev/installing-the-hp-client-management-script-library/</link><pubDate>Tue, 10 Mar 2020 00:00:00 +0000</pubDate><guid>https://4c4806b4.configjon-blog.pages.dev/installing-the-hp-client-management-script-library/</guid><description>&lt;p&gt;If you&amp;rsquo;ve been keeping up with my blog posts, you&amp;rsquo;ll know that HP natively provides a few WMI classes and methods to the WIndows OS. These WMI classes work great for managing BIOS settings, but what if I want to manage Firmware updates or work with HP Softpaqs? One answer is to use the &lt;strong&gt;&lt;a href="https://ftp.hp.com/pub/caps-softpaq/cmit/hp-cmsl.html"&gt;HP Client Management Script Library&lt;/a&gt;&lt;/strong&gt;. The HP CMSL is a bundle of PowerShell modules created by HP for the purpose of managing HP firmware and drivers from the command line.&lt;/p&gt;</description></item><item><title>BIOS Management - Example Task Sequences</title><link>https://4c4806b4.configjon-blog.pages.dev/bios-management-example-task-sequences/</link><pubDate>Mon, 24 Feb 2020 00:00:00 +0000</pubDate><guid>https://4c4806b4.configjon-blog.pages.dev/bios-management-example-task-sequences/</guid><description>&lt;p&gt;&lt;strong&gt;UPDATE September 16th, 2020 - The scripts included in these downloads are currently outdated. I plan to update this post soon with the latest script versions.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Now that I have working BIOS management scripts for Dell, HP, and Lenovo, I figured I would put them all together in a few example task sequences. This post will also act as a hub for my BIOS management posts.&lt;/p&gt;
&lt;h3 id="current-bios-management-posts"&gt;Current BIOS Management Posts&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;&lt;a href="https://4c4806b4.configjon-blog.pages.dev/dell-bios-password-management/"&gt;Dell BIOS Password Management&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;&lt;a href="https://4c4806b4.configjon-blog.pages.dev/dell-bios-settings-management/"&gt;Dell BIOS Settings Management&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;&lt;a href="https://4c4806b4.configjon-blog.pages.dev/hp-bios-password-management/"&gt;HP BIOS Password Management&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;&lt;a href="https://4c4806b4.configjon-blog.pages.dev/hp-bios-settings-management/"&gt;HP BIOS Settings Management&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;&lt;a href="https://4c4806b4.configjon-blog.pages.dev/lenovo-bios-password-management/"&gt;Lenovo BIOS Password Management&lt;/a&gt;&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;&lt;a href="https://4c4806b4.configjon-blog.pages.dev/lenovo-bios-settings-management/"&gt;Lenovo BIOS Settings Management&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;</description></item><item><title>Dell BIOS Settings Management - PSModule</title><link>https://4c4806b4.configjon-blog.pages.dev/dell-bios-settings-management-psmodule/</link><pubDate>Fri, 21 Feb 2020 00:00:00 +0000</pubDate><guid>https://4c4806b4.configjon-blog.pages.dev/dell-bios-settings-management-psmodule/</guid><description>&lt;p&gt;&lt;strong&gt;This post was updated on September 11th, 2020.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Update: Dell does now provide native WMI classes to manage BIOS settings on newer models. For more information, see this post: &lt;strong&gt;&lt;a href="https://4c4806b4.configjon-blog.pages.dev/dell-bios-settings-management-wmi/"&gt;Dell BIOS Settings Management - WMI&lt;/a&gt;&lt;/strong&gt;. For information on using the Dell PowerShell module to configure settings on older models, continue reading this post.&lt;/p&gt;
&lt;p&gt;This post is one of 3 posts in my series on managing BIOS settings using PowerShell. I&amp;rsquo;ve also written about &lt;strong&gt;&lt;a href="https://4c4806b4.configjon-blog.pages.dev/hp-bios-settings-management/"&gt;HP&lt;/a&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;a href="https://4c4806b4.configjon-blog.pages.dev/lenovo-bios-settings-management/"&gt;Lenovo&lt;/a&gt;&lt;/strong&gt;. In this post I&amp;rsquo;ll be talking about using PowerShell to manage Dell BIOS settings.&lt;/p&gt;</description></item><item><title>Configuration Manager Collection Creation Script</title><link>https://4c4806b4.configjon-blog.pages.dev/configuration-manager-collection-creation-script/</link><pubDate>Tue, 18 Feb 2020 00:00:00 +0000</pubDate><guid>https://4c4806b4.configjon-blog.pages.dev/configuration-manager-collection-creation-script/</guid><description>&lt;p&gt;I just finished updating the script I&amp;rsquo;ve been using to bulk create collections in Configuration Manager. I know there are already many different examples of this same type of script out there, but I figured I&amp;rsquo;d share my take on it.&lt;/p&gt;
&lt;p&gt;The script can be downloaded from my GitHub: &lt;a href="https://github.com/ConfigJon/ConfigMgr-Scripts/tree/master/Create-Collections"&gt;&lt;strong&gt;https://github.com/ConfigJon/ConfigMgr-Scripts/tree/master/Create-Collections&lt;/strong&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3 id="create_collectionsps1"&gt;Create_Collections.ps1&lt;/h3&gt;
&lt;p&gt;This script can be used to dynamically create user collections, device collections, and folder structure based on information in a CSV file. The script should be run as a user account with rights to connect to and create collections in Configuration Manager. The script should be run on a computer with the Configuration Manager Admin Console installed. The script will automatically search for the ConfigurationManager.psd1 file, attempt to import it, and connect to the specific site.&lt;/p&gt;</description></item><item><title>App Packaging PowerShell Functions</title><link>https://4c4806b4.configjon-blog.pages.dev/app-packaging-powershell-functions/</link><pubDate>Thu, 30 Jan 2020 00:00:00 +0000</pubDate><guid>https://4c4806b4.configjon-blog.pages.dev/app-packaging-powershell-functions/</guid><description>&lt;p&gt;I&amp;rsquo;ve recently been working on a lot of app packaging, and I decided to take the opportunity to update my scripts. In this post I&amp;rsquo;ll cover 3 PowerShell functions that I found to be the most useful. The functions can be found on my &lt;strong&gt;&lt;a href="https://github.com/ConfigJon/Miscellaneous-Scripts/tree/master/App%20Packaging"&gt;GitHub&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;
&lt;h3 id="invoke-msiexec"&gt;Invoke-MsiExec&lt;/h3&gt;
&lt;p&gt;This function works with msiexec.exe. The function allows for installing or uninstalling a .msi based application.&lt;/p&gt;
&lt;p&gt;The function has a number of parameters:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;FilePath&lt;/strong&gt; - The path to the .msi or .msp file&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Guid&lt;/strong&gt; - The GUID of the MSI-based application to be uninstalled&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Install&lt;/strong&gt; - Indicates that the /i switch should be used when calling msiexec.exe&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Uninstall&lt;/strong&gt; - Indicates that the /x switch should be used when calling msiexec.exe&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Patch&lt;/strong&gt; - Indicates that the /p switch should be used when calling msiexec.exe&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Arguments&lt;/strong&gt; - A comma separated list of arguments to pass to msiexec.exe&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;ExitCodes&lt;/strong&gt; - A comma separated list of non-standard exit codes&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Some notes about the parameters:&lt;/p&gt;</description></item><item><title>Dell BIOS Password Management - PSModule</title><link>https://4c4806b4.configjon-blog.pages.dev/dell-bios-password-management-psmodule/</link><pubDate>Sun, 03 Nov 2019 00:00:00 +0000</pubDate><guid>https://4c4806b4.configjon-blog.pages.dev/dell-bios-password-management-psmodule/</guid><description>&lt;p&gt;&lt;strong&gt;&lt;strong&gt;This post was updated on September 11th, 2020.&lt;/strong&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Update: Dell does now provide native WMI classes to manage BIOS passwords on newer models. For more information, see this post: &lt;strong&gt;&lt;a href="https://4c4806b4.configjon-blog.pages.dev/dell-bios-password-management-wmi/"&gt;Dell BIOS Password Management - WMI&lt;/a&gt;&lt;/strong&gt;. For information on using the Dell PowerShell module to configure passwords on older models, continue reading this post.&lt;/p&gt;
&lt;p&gt;This is the third post in my series on how to manage BIOS / Firmware passwords with PowerShell. Previously, I&amp;rsquo;ve discussed &lt;strong&gt;&lt;a href="https://4c4806b4.configjon-blog.pages.dev/lenovo-bios-password-management/"&gt;Lenovo BIOS Password Management&lt;/a&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;a href="https://4c4806b4.configjon-blog.pages.dev/hp-bios-password-management/"&gt;HP BIOS Password Management&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;</description></item><item><title>Working with the Dell Command | PowerShell Provider</title><link>https://4c4806b4.configjon-blog.pages.dev/working-with-the-dell-command-powershell-provider/</link><pubDate>Sun, 03 Nov 2019 00:00:00 +0000</pubDate><guid>https://4c4806b4.configjon-blog.pages.dev/working-with-the-dell-command-powershell-provider/</guid><description>&lt;p&gt;&lt;strong&gt;This post was updated on February 20th, 2022.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve recently been writing a series of blog posts on how to manage BIOS and Firmware settings using PowerShell. When working with HP and Lenovo hardware I was able to modify the settings by connecting to the WMI classes that are surfaced on the hardware by default. With Dell this was not as straightforward.&lt;/p&gt;
&lt;p&gt;In order to access the Dell WMI classes that can be used to query and modify BIOS settings, the &lt;strong&gt;&lt;a href="https://www.dell.com/support/article/us/en/04/sln311855/dell-command-monitor?lang=en"&gt;Dell Command | Monitor&lt;/a&gt;&lt;/strong&gt; software needs to be installed. This posed another problem, as I wanted to be able to modify BIOS settings while in WinPE, and Dell Command | Monitor only installs in a full Windows OS. The solution to this issue was the &lt;strong&gt;&lt;a href="https://www.dell.com/support/article/us/en/04/sln311262/dell-command-powershell-provider?lang=en"&gt;Dell Command | PowerShell Provider&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;</description></item><item><title>Lenovo BIOS Settings Management</title><link>https://4c4806b4.configjon-blog.pages.dev/lenovo-bios-settings-management/</link><pubDate>Thu, 01 Aug 2019 00:00:00 +0000</pubDate><guid>https://4c4806b4.configjon-blog.pages.dev/lenovo-bios-settings-management/</guid><description>&lt;p&gt;&lt;strong&gt;This post was updated on October 18th, 2020.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This post is one of 3 posts in my series on managing BIOS settings using PowerShell. I’ve also written about &lt;strong&gt;&lt;a href="https://4c4806b4.configjon-blog.pages.dev/dell-bios-settings-management/"&gt;Dell&lt;/a&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;a href="https://4c4806b4.configjon-blog.pages.dev/hp-bios-settings-management/"&gt;HP&lt;/a&gt;&lt;/strong&gt;. In this post I’ll be talking about using PowerShell to manage Lenovo BIOS settings.&lt;/p&gt;
&lt;p&gt;The script can be downloaded from my GitHub: &lt;strong&gt;&lt;a href="https://github.com/ConfigJon/Firmware-Management/tree/master/Lenovo"&gt;https://github.com/ConfigJon/Firmware-Management/tree/master/Lenovo&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;h3 id="lenovo-wmi-and-powershell"&gt;Lenovo, WMI, and PowerShell&lt;/h3&gt;
&lt;p&gt;Lenovo provides a WMI interface that can be used for querying and modifying BIOS settings on their hardware models. This means that we can use PowerShell to directly view and edit BIOS settings without the need for a vendor specific program. This script uses 6 of the Lenovo provided WMI classes.&lt;/p&gt;</description></item><item><title>HP BIOS Settings Management</title><link>https://4c4806b4.configjon-blog.pages.dev/hp-bios-settings-management/</link><pubDate>Mon, 29 Jul 2019 00:00:00 +0000</pubDate><guid>https://4c4806b4.configjon-blog.pages.dev/hp-bios-settings-management/</guid><description>&lt;p&gt;&lt;strong&gt;This post was updated on September 18th, 2020.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This post is one of 3 posts in my series on managing BIOS settings using PowerShell. I&amp;rsquo;ve also written about &lt;strong&gt;&lt;a href="https://4c4806b4.configjon-blog.pages.dev/dell-bios-settings-management/"&gt;Dell&lt;/a&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;a href="https://4c4806b4.configjon-blog.pages.dev/lenovo-bios-settings-management/"&gt;Lenovo&lt;/a&gt;&lt;/strong&gt;. In this post I&amp;rsquo;ll be talking about using PowerShell to manage HP BIOS settings.&lt;/p&gt;
&lt;p&gt;The script can be downloaded from my GitHub: &lt;strong&gt;&lt;a href="https://github.com/ConfigJon/Firmware-Management/tree/master/HP"&gt;https://github.com/ConfigJon/Firmware-Management/tree/master/HP&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;h3 id="hp-wmi-and-powershell"&gt;HP, WMI, and PowerShell&lt;/h3&gt;
&lt;p&gt;HP provides a WMI interface that can be used for querying and modifying BIOS settings on their hardware models. This means that we can use PowerShell to directly view and edit BIOS settings without the need for a vendor specific program. This script uses 3 of the HP provided WMI classes.&lt;/p&gt;</description></item><item><title>HP BIOS Password Management</title><link>https://4c4806b4.configjon-blog.pages.dev/hp-bios-password-management/</link><pubDate>Thu, 18 Jul 2019 00:00:00 +0000</pubDate><guid>https://4c4806b4.configjon-blog.pages.dev/hp-bios-password-management/</guid><description>&lt;p&gt;&lt;strong&gt;This post was updated on September 18th, 2020.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;In my last blog post, (&lt;strong&gt;&lt;a href="https://4c4806b4.configjon-blog.pages.dev/lenovo-bios-password-management/"&gt;Lenovo BIOS Password Management&lt;/a&gt;&lt;/strong&gt;), I talked about managing Lenovo BIOS passwords with PowerShell. I liked how that process worked, so I decided to create a similar process to handle HP BIOS passwords. Once again, the goal was to have a script that could automatically set, change, or clear BIOS passwords while providing logging and optional user prompts. In this post, I’ll cover the basics of how the script works and some limitations of the script.&lt;/p&gt;</description></item><item><title>Lenovo BIOS Password Management</title><link>https://4c4806b4.configjon-blog.pages.dev/lenovo-bios-password-management/</link><pubDate>Mon, 08 Jul 2019 00:00:00 +0000</pubDate><guid>https://4c4806b4.configjon-blog.pages.dev/lenovo-bios-password-management/</guid><description>&lt;p&gt;&lt;strong&gt;This post was updated on October 18th, 2020.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This post discusses how to manage Lenovo BIOS passwords using WMI. My goal was to have a script that could change or clear existing passwords and could display a prompt to the screen when manual intervention was required. In this post, I&amp;rsquo;ll cover the basics of how the script works. I&amp;rsquo;ll also talk about some limitations of the script and some areas it could be improved in the future&lt;/p&gt;</description></item><item><title>Windows Customizations with PowerShell</title><link>https://4c4806b4.configjon-blog.pages.dev/windows-customizations-with-powershell/</link><pubDate>Wed, 26 Jun 2019 00:00:00 +0000</pubDate><guid>https://4c4806b4.configjon-blog.pages.dev/windows-customizations-with-powershell/</guid><description>&lt;p&gt;The out of the box Windows 10 experience has improved over the years, but I still find most clients I work with want to make various tweaks and modifications to the default settings. In the past I would add these customizations to a Configuration Manager task sequence as individual steps. But I&amp;rsquo;m lazy, and I didn&amp;rsquo;t want to have to continually add each individual step over and over. Plus I like to keep task sequences shorter when I can. The solution was to create a PowerShell script that allows the admin to select which of the common Windows customizations to run in their environment.&lt;/p&gt;</description></item><item><title>Create and Print a Word Document with PowerShell</title><link>https://4c4806b4.configjon-blog.pages.dev/create-and-print-a-word-document-with-powershell/</link><pubDate>Thu, 25 Apr 2019 00:00:00 +0000</pubDate><guid>https://4c4806b4.configjon-blog.pages.dev/create-and-print-a-word-document-with-powershell/</guid><description>&lt;p&gt;I was working with a client that had a requirement where each computer that was deployed needed to be paired with a physical document that had information about the computer. The solution I used to automate this process was to use a PowerShell script to take information from a running task sequence, then write and print a Word document.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Here is a high level outline of the process.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Information about the computer and deployment is collected by a PowerShell script during the task sequence&lt;/li&gt;
&lt;li&gt;The same PowerShell script then copies that information to a network share as a CSV file&lt;/li&gt;
&lt;li&gt;A separate computer or server has a Windows Scheduled Task set to run a second PowerShell script on a schedule&lt;/li&gt;
&lt;li&gt;The second PowerShell script takes any CSV files in the network location as input. It uses the data from the CSV files to build a Word document and then sends that document to a printer.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This is the script that runs during the task sequence to collect information and write it to a CSV file on a network share. This example script is collecting the Serial Number, Asset Tag, and Computer Model.&lt;/p&gt;</description></item><item><title>Create Configuration Manager Antimalware Policies with PowerShell</title><link>https://4c4806b4.configjon-blog.pages.dev/create-configuration-manager-antimalware-policies-with-powershell/</link><pubDate>Sun, 24 Mar 2019 00:00:00 +0000</pubDate><guid>https://4c4806b4.configjon-blog.pages.dev/create-configuration-manager-antimalware-policies-with-powershell/</guid><description>&lt;p&gt;As I spend time working in many different Configuration Manager environments, I find myself regularly needing to create Antimalware Policies. Most of the settings in the antimalware policies can be configured quickly, however the setting that always takes me the most time is the Exclusion Settings.&lt;/p&gt;
&lt;p&gt;There needs to be different policies with different exclusion settings for different types of devices. Each of these separate policies have 3 different areas for adding file paths, file types, and processes. And for some reason, unknown to me, the dialog window for adding exclusions has a 260 character limit. This means that even if all the exclusion settings are in a list, you can&amp;rsquo;t just copy the whole list in at once. All this adds up to make this process time consuming and inconsistent.&lt;/p&gt;</description></item><item><title>Create Windows Firewall Rules for AppData Executables</title><link>https://4c4806b4.configjon-blog.pages.dev/create-windows-firewall-rules-for-appdata-executables/</link><pubDate>Thu, 14 Mar 2019 00:00:00 +0000</pubDate><guid>https://4c4806b4.configjon-blog.pages.dev/create-windows-firewall-rules-for-appdata-executables/</guid><description>&lt;p&gt;I was recently deploying an application that required Windows Firewall rules to be created for an executable that ran from each user&amp;rsquo;s AppData folder. The way I accomplished this was to use a combination of PowerShell scripts and the Windows Task Scheduler.&lt;/p&gt;
&lt;p&gt;I created two PowerShell scripts for this solution. &lt;strong&gt;Create_Scheduled_Task.ps1&lt;/strong&gt; and &lt;strong&gt;Create_Firewall_Rules.ps1&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;Create_Scheduled_Task.ps1&lt;/strong&gt; script copies the Create_Firewall_Rules.ps1 script to a subfolder in C:\Users\Public and creates a scheduled task to run that script each time a user logs onto the computer. You will need to set the &lt;strong&gt;$appName&lt;/strong&gt;, &lt;strong&gt;$scriptName&lt;/strong&gt;, and &lt;strong&gt;$folderPath&lt;/strong&gt; variables.&lt;/p&gt;</description></item><item><title>Modify Local Administrators Membership</title><link>https://4c4806b4.configjon-blog.pages.dev/modify-local-administrators-membership/</link><pubDate>Wed, 13 Mar 2019 00:00:00 +0000</pubDate><guid>https://4c4806b4.configjon-blog.pages.dev/modify-local-administrators-membership/</guid><description>&lt;p&gt;I encountered a scenario where I needed to add or remove domain users from the local administrators group on an individual computer basis. The &lt;a href="https://docs.microsoft.com/en-us/sccm/apps/deploy-use/create-deploy-scripts"&gt;&lt;strong&gt;Run Script&lt;/strong&gt;&lt;/a&gt; feature in Configuration Manager worked great for this.&lt;/p&gt;
&lt;p&gt;I used an Add script and a Remove script. Both scripts have a $Member parameter that takes the name of a domain user or group and adds it to or removes it from the local administrator group on selected computers.&lt;/p&gt;</description></item></channel></rss>