Working with Windows Registry Keys and PowerShell

I often ponder while scripting tasks for Deletion or Creation of Registry keys or Registry Properties with appropriate Types and Values with corresponding Data. Here is a quick consolidated example that covers various use cases when you want to automate Registry Settings on your Windows Clients. Sample script as below: # Working with Windows Registry … Continue reading Working with Windows Registry Keys and PowerShell

PowerShell script for updating DFS paths for all the shortcut files (.lnk)

Here is the final version of a PowerShell script that I have created for updating DFS paths for all the shortcut files (.lnk). The script has been fine tuned to the best of my ability for optimum performance, no where close to how a PowerShell professional would have done it. My special appreciation to Kevin … Continue reading PowerShell script for updating DFS paths for all the shortcut files (.lnk)

Create AppVolume Writables for AD Groups with PowerShell

If you wish to automate the Creation of AppVolume Writables for AD Groups with PowerShell, then look no further as this blogpost is exactly what you need. Post has been updated with code fixes after multiple runs of Trials and Errors. Enjoy ! [CmdletBinding()] Param( [Parameter(Mandatory=$True)] [string]$AppVolumesUser, [Parameter(Mandatory=$True)] [securestring]$AppVolumesPassword ) [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 $BSTR = … Continue reading Create AppVolume Writables for AD Groups with PowerShell

Creating Registry Keys & Values; Replace #If with #Switch Statements #PowerShell

How to Create Different Registry Keys with varying Registry Values and Value Data with #PowerShell and #Switch Statement + Logging Sample script as below: <# HKCU:\SOFTWARE\Microsoft\Office\16.0\Word\Options “AUTOSAVE-PATH” HKCU:\SOFTWARE\Microsoft\Office\16.0\PowerPoint\Options “PathToAutoRecoveryInfo” HKCU:\SOFTWARE\Microsoft\Office\16.0\Excel\options “AutoRecoverPath” #> Function LogIt { Param ( [Parameter(Mandatory=$True)] $Message, [Parameter(Mandatory=$True)] $Component, [Parameter(Mandatory=$True)] $Type ) switch ($Type) { 0 { $Type = “SUCCESS” } 1 { … Continue reading Creating Registry Keys & Values; Replace #If with #Switch Statements #PowerShell

Please help! #saveFaizan

Bismillah-Hir-Rehmaan-Nir-Raheem Hi Friends,  With great sorrow, I wish to bring to your immediate attention, that my 16 year old nephew has been diagnosed with Aplastic Anemia and we are making sincere efforts towards raising funds to support the medical expenses for his treatment. My nephew, Md. Faizan is my sister’s only son. The family is … Continue reading Please help! #saveFaizan

Windows 10 ADK Version History

Windows 10 ADK Version History Windows ADK for Windows 10 v1803 10.1.17134 Apr, 2018 Download link Windows ADK for Windows 10 v1709 10.1.16299 Oct, 2017 Download link Windows ADK for Windows 10 v1703 10.1.15063 Mar, 2017 Download Link Windows ADK for Windows 10 v1607 10.1.14393.0 Sep, 2016 Download Link Windows ADK for Windows 10 v1511 … Continue reading Windows 10 ADK Version History

#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)