Archives by date
You are browsing the site archives by date.
By: Brenton Blawat
When I develop different scripts for organizations, I like to customize the Window title as a small a “small touch”. For engineering firms, the window title may secure their intellectual property when the script is being run.
For whatever reason you want to customize the PowerShell Window Title, it’s a simple one liner.
$Host.UI.RawUI.WindowTitle = “Copyright © 2016 MasteringPosh.com. All Rights Reserved. Read More…
By: Brenton Blawat
This quick article explains how to search for installed or pending Windows Updates on a system leveraging PowerShell, and create a report of what was found.
Recently I wrote a script that was to determine the current state of infrastructure in an environment. One of the items we wanted to scan for was the current state of Windows Updates. It’s often surprising and sometimes outright scary the current Windows update state of Windows Infrastructure. Read More…
By: Brenton Blawat
This quick article quickly goes over scanning the contents of files using PowerShell. There will be a later series of blogs that will explain how to search and replace items in a file using PowerShell, how to search XML files using PowerShell, and how to search using regular expressions.
Over the last 10 years, I’ve come across many situations where I need to scan the contents of files using PowerShell. Read More…
Let me start this out with don’t worry – its easy. Regular expressions often times cause people to immediately move on to the next solution but I guaranty that you’ll be able to do this with ease.
The idea for this article all started when I reading an article from Ed Wilson’s Hey Scripting Guy blog. He had a guest blogger Rob Campbell who wrote an article on “Speed Up Array Comparisons in PowerShell with a Runtime Regex” (That article can be found here.). Read More…
While there are many posts that describe the code to do this function, there aren’t many posts that provide variables with meaning or actually describe the syntax. This post describes the method by which you can retrieve a Distinguished Name from a Fully Qualified Domain Name.
Fully Qualified Domain Name (FQDN): division.domain.root
Distinguished Name (DC): DC=division,DC=Domain,DC=root
Canonical Name(CN): division.domain. Read More…
A large hospital recently had been experiencing issues with their SCCM Server replication and SCCM Remote Console. Read More…
This article explains the the method by which one would be able to Search Active Directory for the distinguished name of a User or Group. This is helpful when trying to add an object to Active Directory or adding Users to Groups. Read More…
This article is designed to be short and sweet. This article displays the method by which one would retrieve the FQDN or Distinguished Name of the Domain. This is code is very useful for any operations in Active Directory. A must know for any scripter that needs to call the domain on a system without hard coding the value in the script.
Lets take a theoretical network that consists of ‘division’ subdomain, ‘domain’ as the domain, and ‘root’ as the domain root. Read More…
The encryption and decryption of strings is essential when creating an enterprise product that has clear text passwords. This function displays how to encrypt and decrypt a string using Powershell using Richard’s code located at http://poshcode.org/116. While I found his code very useful, he didn’t explain the syntax and is why I am reposting this with the proper information.
I also decided to make this into an endless loop for an administrator to use to encrypt multiple passwords in a row. Read More…
This article is to aid those who are receiving the “Data is Invalid” error message in PowerShell on Windows Server 2008 R2. This issue occurs while trying to import policies from one domain into their a different domain using a migration table. This issue has to do with the migration table editor referring to the “Pre-Windows 2000 Username” to migrate users instead of their Standard Username. Read More…