Ten Handy PowerShell Commands

PowerShell is the command line included with Windows. It is a very handy tool for doing simple tasks without the GUI. In this guide, I’ll show you 10 tips that will improve your Windows Server experience and make your life easier.

Getting a Process

Rather than using the Task Manager or a similar tool, you can use PowerShell to retrieve information about a specific process and kill it, if needed. This will show the process ID (Id ProcessName):

Get-Process ProcessName

Official documentation

Killing a Process

Once you have the process ID of a process, you can kill it:

Stop-Process -id PID

Official documentation

Getting Contents of a File

You can actually get the content of a file (for example a .txt file) and view it in PowerShell:

Get-Content file.txt

Official documentation

Getting Item Information

You can get information about a certain file with the Get-Item command. The cool thing about this is that you can use it to return multiple kinds of data, for example, you can see the last time somebody accessed a file:

$(Get-Item D:\Users\William\Desktop\file.txt).lastaccesstime

Official documentation

Deciphering A PRI Turn-up Worksheet

The following outlines some of the more confusing vocabulary pertaining to Primary Rate Interface (PRI) turn-up.

PIC/LPIC – Probably the most confusing acronym out of the bunch. PIC stands for Primary Interexchange Carrier. This is your long distance carrier. This is a code that is kept in a database and when you need to make a long distance call, the telco consults this database to know whose network to send the call along. A great explanation of long distance calls can be found HERE. Conversely, the LPIC is the Local Primary Interexchange Carrier. In other words, they are the company that handles your local calls that aren’t long distance. These two providers can be different, and in many cases they are. In rural areas, the LPIC is the local telco, and the PIC is a larger carrier like AT&T or Verizon. I’ve found that many companies will give you a deal if you specify them for both PIC and LPIC. Most of the time, the PIC/LPIC choice will be whomever is installing the PRI for you, such as AT&T or Cox Communications.

DID – Another one that confuses people. In this case, DID stands for Direct Inward Dial. This is a huge change from the way an analog circuit works. With an analog circuit (like my house), when you call my number it sends an electrical signal along the wire telling the device at the other end to ring. When we hook this circuit up to a CUCM/CCME system, we usually have to configure Private Line Automatic Ringdown (PLAR) in order to be sure something gets trigger when the electrical signal arrives. A PRI doesn’t use electric signals to trigger ringing. Instead, they are configured with two different fields, the Calling Party and the Called Party. In this example, the Calling Party is what is most often referred to as “Caller ID”. The Called Party on a PRI is the DID. This is a number that is delivered to the PRI and sent to the PBX equipment on the other end. The name comes from the fact that these numbers are most often used to directly reach internal extensions without the need to reach a PBX operator or automated attendant. The DID can be configured to ring a phone, a group of phones, or even a recording. The numbers that used to belong to your analog circuits will usually be moved over to a group of DIDs and pointed at the PRI.

Outpulsed Digits – This one sounds straight forward. Digits are being sent somewhere, right? Remember that this worksheet is from the perspective of the service provider, so the outpulsed digits are what the provider is sending to your equipment. You have tons of options, but most providers will usually limit your options to 4, 7, or 10 digits.