-
PowerShell Script – Change the PowerShell Window Title
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.
PowerShell
$Host.UI.RawUI.WindowTitle = “Copyright © 2016 MasteringPosh.com. All Rights Reserved. Read More…
-
PowerShell Script – How to Search for Installed / Pending Windows Updates Using PowerShell
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…
-
PowerShell Script: How to Scan a File using PowerShell — Brenton Blawat
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…
-
PowerShell Script – Multiple Array Comparisons using Regular Expressions
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… -
PowerShell Script: Retrieving Distinguished name (DN) from A Fully Qualified Domain Name (FQDN)
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.
Quick Reference:
Fully Qualified Domain Name (FQDN): division.domain.root
Distinguished Name (DC): DC=division,DC=Domain,DC=root
Canonical Name(CN): division.domain. Read More… -
System Center Configuration Manager (SCCM) 2007 R3 – Device Discovery Issue / Health Check Script
A large hospital recently had been experiencing issues with their SCCM Server replication and SCCM Remote Console. Read More…
-
PowerShell Script: Finding A Distinguished Name of a Group/User: Function Find-DN
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…
-
PowerShell Script: Distinguished Name / Fully Qualified Domain Name to string
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… -
PowerShell Script: Encrypting / Decrypting A String – Function Encrypt-String
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…