Admin Arsenal

Enabling/Disabling Java (NPAPI) in Google Chrome by Using the Registry

Posted by Kris Powell

Apr 16, 2015 12:38:00 PM

Note: Watch Shane and Lex explain how to enable the Java plugin in Chrome in their recent webcast.

Read More

Topics: powershell

Create Shortcuts on User Desktops using Powershell

Posted by Kris Powell

Mar 19, 2015 1:10:00 PM

Let’s take a fairly common task that many system administrators face: creating shortcuts on all user desktops.

PDQ Deploy and PowerShell go together like eggs and bacon. There are so many things that PowerShell can do by itself, but when combined with the power of PDQ Deploy, the sky becomes the limit for what's possible.

We’re going to assume that PDQ Deploy and PowerShell are already installed.

Using PowerShell to Create a Shortcut on All User Desktops

Read More

Topics: powershell

Secure Password with PowerShell: Encrypting Credentials - Part 1

Posted by Kris Powell

Feb 26, 2015 2:20:00 PM

Like many systems administrators out there, I’ve often found myself with a task that needs to be automated. Automating is great with PowerShell until you need to pass credentials into a script.

At this point, I have seen many administrators put passwords into the body of their script. For testing purposes, this may be forgiven, but in production scripts, putting your passwords in plain view isn’t just a bad thing...it’s a terrifying thing. It should be a cardinal sin. But you can secure a password with Powershell (or at least reduce password visibility).

First, we should touch base on how to supply a credential without having to save it directly in your script.

Read More

Topics: powershell

PowerShell: Sending a Wake-On-LAN (WOL) Magic Packet

Posted by Kris Powell

Feb 5, 2015 4:08:00 PM

Recently, I’ve had the opportunity to learn more about how WOL magic packets work. That got me thinking about how to create my own magic packet via PowerShell.

Up until this point, I hadn’t really put much thought into sending individual Wake-on-LAN (WOL) packets to individual machines in our network, seeing as it is super easy to do that by using PDQ Inventory and PDQ Deploy.

Wake-on-LAN and the Magic Packet

Read More

Topics: powershell

PowerShell: Copying Individual Files and Renaming Duplicates

Posted by Kris Powell

Jan 8, 2015 1:28:32 PM

There are many factors to consider when copying files within a script.

In many instances, we check for the existence of a file and only copy the file if it does not exist. Sometimes we only copy if it’s older/newer than a certain file.  Sometimes we only copy if the file sizes are different...and so on and so forth.

I’m sure that you get the idea. There are many things to consider.

For this particular case, I wanted to keep all copies and rename any duplicates sequentially. I will be using Copy-Item to get this done.

Read More

Topics: powershell

Powershell: Silently Change Firefox Default Search Providers

Posted by Kris Powell

Dec 11, 2014 11:26:00 AM

By now, I’m sure many (if not all) of you are aware that the latest version of Firefox modified the default search provider to be Yahoo for all U.S. customers.

It’s simple enough to change on an individual basis for any particular user (instructions here).  As system administrators for our various organizations, the issue that we often run into is making sweeping changes for many machines all at once.

Read More

Topics: powershell

PowerShell: Text-to-Speech Examples

Posted by Kris Powell

Oct 30, 2014 3:53:00 PM

This is a fun way to utilize Text to Speed (TTS) with PowerShell for Halloween. This is a fun little prank you can use to turn your users computers into "haunted" computers as long as they've got their speakers on. 

Read More

Topics: powershell

PowerShell: Zip up files using .NET and Add-Type

Posted by Kris Powell

Oct 16, 2014 10:00:00 AM

I recently came across a need to zip up some files prior to copying them over the network. Normally, I’d simply use another tool such as WinZip or 7zip, but I thought I’d like to see how PowerShell could handle it.

There are many tools out there to help you with this (7zip cli, PowerShell community extensions, etc). They’re not included with Powershell, so I decided to try and make use of the tools we have at hand.

Read More

Topics: powershell

PowerShell: Sending Email (with Gmail example)

Posted by Kris Powell

Oct 9, 2014 10:55:00 AM

It’s late on a Friday night. Like most people, you have somewhere else you would rather be. Instead, you are stuck at work because you completely forgot about some scheduled maintenance that has to be done that night.

You’re familiar enough with PowerShell to make some scripts to take care of the maintenance, but you’re worried about the off-chance that one of the scripts fails or you’re worried that something could go wrong.

Wouldn’t it be great if you could start your scripts and configure them to email you the results? You could still get out, enjoy your Friday night and rest assured that you’re scripts are doing their job without you losing yours!

Read More

Topics: powershell

Powershell: Get CPU Usage for a Process Using Get-Counter

Posted by Kris Powell

Oct 2, 2014 11:08:00 AM

I was on Stack Overflow not too long ago when I came across a post involving gathering CPU usage by percentage that I simply couldn’t pass up. I had to see how PowerShell would handle it.  

I wasn’t disappointed.

Read More

Topics: powershell

Subscribe to Email Updates