PowerShell: Using Get-ChildItem to Find Files by Date and Time

Posted by Kris Powell

Aug 25, 2015 2:39:42 PM

As a sysadmin (system administrator), we often find ourselves needing to take inventory of the workstations and servers that we manage. We have all likely faced similar questions at some point in our careers.

  • Which workstations and servers are getting full on space?
  • Which user is a disk hog?
  • Where are all my *.mp3 files?
  • How many marshmallows can I fit into my mouth at once?

These are important questions. We have all probably had the wonderful opportunity to panic when realizing that we're getting dangerously low on disk space (or marshmallows).

Read More

Topics: powershell

Using PowerShell to Set Static and DHCP IP Addresses - Part 2

Posted by Kris Powell

Jun 18, 2015 10:00:00 AM

Today, we’re going to cover how to set static/DHCP IP (pronounced duhiccup'ip...Wrongly.) addresses via Get-WMIObject and WMI (Windows Management Instrumentation), which will work for those of us still using Windows 7.

Read More

Topics: powershell

Using PowerShell to Set Static and DHCP IP Addresses - Part 1

Posted by Kris Powell

Jun 1, 2015 8:15:00 AM

You come into the office on a Monday morning and your boss has an uncertain look on his face that reeks of trouble. You find out that you're moving office suites and have to reconfigure your entire office network to play nicely with an existing network. A little part of you dies along with the hope of a productive week.

Read More

Topics: powershell

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

Subscribe to Email Updates