#PowerShell script to generate a new Random Computer Name

Here is a #PowerShell script that generates a new Random Computer Name. The Function can be called with a parameter variable for Computer Name Length as an Integer. Usage : New-RandomComputerName -NameLength 20 Function New-RandomComputerName {     [CmdletBinding(SupportsShouldProcess=$True)]     Param(         [int]$NameLength     )     #Characters Sets to be for Password Creation     $CharSimple = “A”,”B”,”C”,”D”,”E”,”F”,”G”,”H”,”J”,”K”,”L”,”M”,”N”,”P”,”Q”,”R”,”S”,”T”,”U”,”V”,”W”,”X”,”Y”,”Z”,”1″,”2″,”3″,”4″,”5″,”6″,”7″,”8″,”9″,”0″     … Continue reading #PowerShell script to generate a new Random Computer Name

#PowerShell script to generate a new Random Password

Here is a #PowerShell script that generates a new Random Password – Complex OR Simple. Need to pass parameter variables for Password Length and a Boolean for Complexity. Usage : New-RandomPassword -PwdLength 20 -Complex $true Usage : New-RandomPassword -PwdLength 20 -Complex $false Function New-RandomPassword {     [CmdletBinding(SupportsShouldProcess=$True)]     Param(         [int]$PwdLength,         [boolean]$Complex     )     … Continue reading #PowerShell script to generate a new Random Password

#PowerShell script to format Serial Number with a certain length and exclusion of special characters

Here is a little #PowerShell snippet that queries the BIOS WMI Class for the Serial Number. Formats it with certain length of your choice and removes special characters, spaces and hyphens. The Sample snippet is using the Length Parameter Variable $SNLength as 6 (Please change this as per your requirement). My use case was to only fetch the … Continue reading #PowerShell script to format Serial Number with a certain length and exclusion of special characters

#PowerShell script to Check for Pending Reboot on Remote Computer(s)

Here is a #PowerShell script to Check for Pending Reboot on Remote Computer(s). It is also accompanied with logging in CMTRACE format. The Check Pending Reboot is based on the following parameters conditions  CBServicing = Component Based Servicing (Windows ALL) WindowsUpdate = Windows Update / Auto Update (Windows ALL) CCMClientSDK = SCCM 2012 Clients only (DetermineIfRebootPending method) PendFileRename … Continue reading #PowerShell script to Check for Pending Reboot on Remote Computer(s)

#PowerShell script to Compare a Registry value string.

Here is a #PowerShell script to Compare a Registry version string to the version string passed as a parameter switch. And, it comes with logging as well and that too in CMTRACE format. The logging snippet has been borrowed from Russ Slaten and the script is available for download here. Example: To Compare the Notepad++ version from … Continue reading #PowerShell script to Compare a Registry value string.