Category Archives: PowerShell

My MDT PowerShell Template

By | March 17, 2014
Share

I’ve recently come to really appreciate PowerShell as the most versatile and powerful language available natively in any/all Windows OS. i.e. 2 lines of code to ensure laptop battery is plugged in and prompt the user. If ((Get-WmiObject -Query “SELECT * From Win32_Battery”).BatteryStatus -ne 2) { Write-Host “Please plug in your laptop” } An equivalent… Read More »

PowerShell Script to Query Wireless Modem and pull Asset Information.

By | February 3, 2014
Share

Pulling a Wireless WAN Modem’s information while in the field is a daunting task. Here is a script to pull this information using AT commands with in a PowerShell script. The script was tested on a CF-53J Toughbook laptop with an embedded Sierra 7750 (Verizon LTE) modem. The script displays methods of capturing the information… Read More »

MDT 2013 offers an astounding 37,403 lines of code for free.

By | October 28, 2013
Share

I took a couple of minutes out Today to pull the amount of code is offered for free by implementing MDT 2013 from Micosoft.  Here is the powershell I wrote up for querying up the number:

Results: Count : 95 Average : Sum : 37403 Maximum : Minimum : Property :   /Brian G

My Search and Apply .WIM Image files script with recovery partition creation.

By | September 25, 2013
Share

Once powershell was supported in WinPE, I converted my .VBS search and apply script over.  I add this script into my startnet.cmd, so it is started after initializing WinPE. Here are the steps of the script: Prompts the user asking them to verify that they want to run recovery. Prompts for recovery password if “$sRecoveryPassword”… Read More »

Powershell Post to Auto-Import all .REG files from Current Directory (Script Directory)

By | May 30, 2013
Share

Here is a script/package that I like to include when consulting. It simply auto-imports all .reg files from the same directory where the script is stored. Its great, because people can simply export .reg files and add them into the folder and the next time a deployment takes place, the .reg file is imported.