• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
OpenTechTips

OpenTechTips

Practical IT Guides, Expert Tips, and Real-World Solutions

MENUMENU
  • HOME
  • ALL TOPICS
    • Exchange
    • InfoSec
    • Linux
    • Networking
    • Scripting
      • PowerShell
    • SSL
    • Tools
    • Virtualization
    • Web
    • Windows
  • ABOUT
  • SUBSCRIBE

Scripting


Scripting


Scripting

How to Delete Old PowerShell Modules

September 13, 2025 Zsolt Agoston
A function to check for all old versions of installed modules are remove them permanently to free up disk space ... [Read More]
Scripting

How to Update All PowerShell Modules – All at Once

September 13, 2025 Zsolt Agoston
A one-liner to update all PowerShell modules installed from online repositories ... [Read More]
Scripting

How to Run a Command Stored in a Variable | PowerShell

May 5, 2025 Zsolt Agoston
Use the & operator to execute the content of a variable in PowerShell ... [Read More]
Scripting

Show Error Details – PowerShell

December 27, 2022 Zsolt Agoston
How to get verbose PowerShell error messages ... [Read More]
Scripting

How to Test Open Port in PowerShell

December 4, 2022 Zsolt Agoston
Two ways to check open ports with PowerShell ... [Read More]
Scripting

Easy Password Generator in PowerShell

October 6, 2022 Zsolt Agoston
Use PowerShell to generate randomized passwords in a length and count you want! ... [Read More]
Scripting

PowerShell: How to parse a large one-line XML

March 1, 2022 Zsolt Agoston
Parse unformatted (one-liner) xml files, adding line breaks and indentation using Linux ... [Read More]
Scripting

PowerShell: How to Reverse an Array

February 22, 2022 Zsolt Agoston
Learn how to reverse an array of any kind in PowerShell ... [Read More]
Scripting

How Does UTF-8 Encoding Work

December 29, 2021 Zsolt Agoston
Learn what the UTF-8, UTF-16 and UTF-32 encodings are, how they work, what is BOM and how variable length encoding is utilized to represent over a 100 thousand characters in a simple text file ... [Read More]
Scripting

How to Move Files from Multiple Subfolders to a Single Folder with PowerShell?

December 19, 2021 Zsolt Agoston
How to move all files that matches a pattern from subdirectories to a cetralized target location ... [Read More]
Scripting

PowerShell: Extract Pattern from a String

August 11, 2021 Zsolt Agoston
Two methods of extracting text from an input string with PowerShell using regex expressions ... [Read More]
Scripting

Regex tricks – Remove leading and trailing white spaces with Notepad++ and Vim

August 1, 2021 Zsolt Agoston
Learn how to remove leading and trailing whitespaces with either Notepad++ or Vim ... [Read More]
Scripting

Grep command in PowerShell (recursive)

May 10, 2021 Zsolt Agoston
A simple function to mimic the Unix recursive grep command ... [Read More]
Scripting

PowerShell – How to Decrypt a SecureString

March 18, 2021 Zsolt Agoston
Two ways to decrypt a SecureString in PowerShell ... [Read More]
Scripting

Base64 Encode with Fixed Line Length Output in PowerShell

March 10, 2021 Zsolt Agoston
Here is an example script that encodes an arbitrary text with Base64 method using PowerShell and breaks up the output into fixed-length lines to make it more easily readable. We use 76 character long rows as the MIME (Multipurpose Internet ... [Read More]
Scripting

Split a String Into Fixed Length Lines in PowerShell

March 9, 2021 Zsolt Agoston
A one-liner to split up a long string into fixed-length rows in PowerShell ... [Read More]
Scripting

How to List the Total Size of a Folder with PowerShell

November 29, 2020 Zsolt Agoston
List the total size, the subfolder-count, and the file-count of a folder or subfolder in PowerShell ... [Read More]
Scripting

PowerShell – How to add extra column to a CSV Export

November 17, 2020 Zsolt Agoston
Have you ever found yourself in a situation where you wanted to export the output of a PowerShell cmdlet or script, but needed to add an extra column to the output to export to a CSV file? Let's see how ... [Read More]
Scripting

Random Password Generator in PowerShell

October 15, 2020 Zsolt Agoston
A one-liner to generate passwords with PowerShell. Specify the length and the characters that builds up the passwords and off you go! ... [Read More]
Scripting

Script to Customize the look of a PowerShell Window

September 26, 2020 Zsolt Agoston
A PowerShell window looks pretty unified when it starts up. Especially if there are multiple windows open at the same time it might be helpful if they were distinguishable. Like a different color as the background, or a specific title ... [Read More]
Scripting

Install-PackageProvider: No match found error when installing PowerShell modules | FIX !

August 6, 2020 Zsolt Agoston
The Issue PowerShell - Install-PackageProvider: No match found error when installing PowerShell modules | FIX ! In  a new deployment of Windows Server 2016 or 2019 when using the Install-Module [xxx] command you might be prevented with the following error ... [Read More]
Scripting

Regex tricks – Remove empty lines with Notepad++ and Vim

June 16, 2020 Zsolt Agoston
Quickie guide for removing empty lines with Notepad+ and Vim ... [Read More]
Scripting

Regex tricks – Remove Commented Out Lines with Notepad++ or Vim

June 14, 2020 Zsolt Agoston
Both Notepad++ in Windows and Vim in unix-type machines are perfectly capable of using regular expressions which is a super handy tool in an admin's hands ... [Read More]
Scripting

Storing Passwords for PowerShell Scripts – ALWAYS WORKS!

June 7, 2020 Zsolt Agoston
In case you cannot use the CredentialManager PowerShell module to store and retrieve user credentials, but you still need to securely store user passwords or other confidential data there is another way to do so. 1. Securely Encrypt and Store ... [Read More]
Scripting

Base64 Encoder and Decoder Algorithm in PowerShell – with Examples

May 31, 2020 Zsolt Agoston
The idea of encoding and decoding to- and from Base64 using PowerShell is based on the very same algorithm as we used in our Python example. In this short article we go through the process of encoding and then decoding ... [Read More]
Scripting

Base64 Encoder and Decoder Algorithm from Scratch in Python

May 29, 2020 Zsolt Agoston
In Python there is a built-in Base64 encoder/decoder ready to use. Here is a very simple example on how to encode and decode using the built-in base64 library ... [Read More]
Scripting

Base64 Encoding Explained with Examples

May 27, 2020 Zsolt Agoston
Have you ever been wondering why SSL certificates have a strange code in their body, that seemingly only consists of letters, numbers, the "+" and the "/" characters? If you've ever checked the actual content of a saved email, the ... [Read More]
Scripting

PowerShell Abbreviation Table

May 1, 2020 Zsolt Agoston
Have you ever wondered while typing the same long PowerShell command again and again, that there must be an abbreviation for at least a few of them? Here you go! ... [Read More]
Scripting

How to SECURELY store credentials for PowerShell scripts

April 30, 2020 Zsolt Agoston
Every day we need to log into hundreds of portals, as it is important for security, there must be a way to script it, automate logins without putting our actual passwords in scripts in plain text, right? Luckily this is ... [Read More]
Scripting

Math: X To The Power of Y in PowerShell

April 13, 2020 Zsolt Agoston
Math in PowerShell is very simple and straightforward, the basic operators work as they usually do in any programming or scripting language: 1 + 1, 64 - 16, 4 * 32, 1024 / 128, etc. However, many times I faced ... [Read More]

Primary Sidebar

Tools

  • Terms of Use
  • Disclaimer
  • Privacy Policy
Manage your privacy
We use technologies like cookies to store and/or access device information. We do this to improve browsing experience and to show (non-) personalized ads. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
Manage options
  • {title}
  • {title}
  • {title}
Manage your privacy
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
  • Manage options
  • Manage services
  • Manage {vendor_count} vendors
  • Read more about these purposes
Manage options
  • {title}
  • {title}
  • {title}