Automating to uninstall software from a Windows machine can sometimes be a cumbersome task, especially to uninstall applications based on the versions installed. In such cases, PowerShell can come to the rescue by leveraging the Windows Registry to find and uninstall the application in question. Today, I’ll share a script that will uninstall almost any type of application, which can be used along with SCCM or MDM solutions as well.
Continue reading “Using Powershell to Uninstall Applications”Category: Powershell
Powershell for Object-based Selection Prompt
One of its most powerful features of PowerShell is its ability to work with objects, allowing you to manipulate data in a structured and intuitive way.
Today, we’ll explore how to make an object-based user selection menu in PowerShell. Using Out-GridView
is an easiest option for this purpose. Also, I make a custom function for the object-based user selection.
Powershell for Bulk Character Conversion
Are you dealing with text data that you need to convert different characters or words or symbols in bulk? In this blog post, I’ll introduce a powershell script that streamlines the conversion process, making it easy to work with text data across different languages and character sets.
Continue reading “Powershell for Bulk Character Conversion”Resolving winget not recognized error when running with the System Account
Although winget exists on your system, but when you try to run the winget with system account (or using the scheduled task with the system account) and you see this error.
winget : The term ‘winget’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Continue reading “Resolving winget not recognized error when running with the System Account”Simple Powershell Template Text Generator
Recently, I came across the need to generate multiple kickstart files. The usual approach involves using Jinja2 and Python. However, since I won’t be using logical expressions within the template and so a simple replacement of text will suffice for this, so I decided to create my own in powershell.
Continue reading “Simple Powershell Template Text Generator”Powershell Script for Day-to-Day Active Directory Operations
Hi fellow scripters, I’m pretty sure this handy script will help system admins to make a day-to-day AD operation super easy. You can quickly jump into the screenshots to get an overview idea. Note that Powershell module for AD is required for this script.
Things to note:
By running this script, all users/groups in the text file or all child users/groups under the defined OU will be affected. So, make sure you are completely aware of the explanation of parameters you want to do with the script. The suggestion is to test on your non-production systems first.
Continue reading “Powershell Script for Day-to-Day Active Directory Operations”Set Any Attribute of AD users by using PowerShell Script
Updated Post: Now, instead of the SamAccountName you need to use Identity in the csv header to identify users (which is the existing SamAccountName of users).
Eg: if you want to modify the user who has the SamAccountName user01 to user001, then you need to put user01 under the Identity column and user001 under SamAccountName column in the csv file.
Continue reading “Set Any Attribute of AD users by using PowerShell Script”Network Connection Notify Tool is Released
It will check the connection continuously at specified intervals and notify users with voice or desktop notification if the connection change is detected. If you don’t know how to set the Tiebreaker or Interval, you can just use Check Type template dropdown. Alternatively, you can use this as a network port probing tool to continuously monitor the listening port.
If you want to start quickly, get a packaged 64-bit version from GitHub. The voice type, speed, volume, notification message can be customized, with the logging option available.
Continue reading “Network Connection Notify Tool is Released”Delete Empty Folders with Powershell Recursively
In this blog, I’d like to show you the little one-liner powershell code that will delete empty folders recursively.
Note: Even if there is a single file in the child nested folder, it will exclude the parent path from deletion. Continue reading “Delete Empty Folders with Powershell Recursively”
Make a read-able windows DNS debug log file
Normally we turn on the DNS debugging to find out the source client IP addresses and the queried records. And, here is the script that will covert the DNS Debug Log file into a more flexible csv format, though you will have to rename the file to .csv if needed. New lines, whitespace and header information will be ignored during conversion. The script supports DNS Debug log of Server 2012, 2016 and 2019 (not tested on Server 2008 and if you can do it successfully, please comment). This script should not be run on Domain Controllers/DNS Servers as it consumes certain amount of processing power. Continue reading “Make a read-able windows DNS debug log file”