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 (
Killing a Process
Once you have the process ID of a process, you can kill it:
Stop-Process -id PID
Getting Contents of a File
You can actually get the content of a file (for example a
.txt file) and view it in PowerShell:
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:
For those of you who continue to visit this blog regularly, comment on posts and provide feedback - thank you!
The last couple years have been very busy for me both personally and professionally. Looking ahead at 2016 I am going to attempt to do a better job on posting more regularly. In the mean time, sit back, relax and enjoy some of my older posts
Happy New Year 2016!
Upgrading the Ubiquiti Network Video Recorder (NVR) operating system (Debian) and AirVision recording controller can be a fairly daunting task I've you are unfamiliar with the Debian command line interface (CLI) and/or Linux distrobutions in general. In addition, Ubiquiti doesn't provide a GUI based upgrade option for older NVR software versions (e.g. 2.x) and no upgrade capability for the OS.
This simple outline should help you get the job done.
1. Open a shell session to the NVR appliance:
ssh root@(IP Address)
2. Enter the following commands to upgrade your NVR's Debian OS:
#apt-get update ; apt-get upgrade -y ; apt-get dist-upgrade -y ; apt-get autoremove -y ; apt-get autoclean ; apt-get clean
3. Once complete reboot the NVR:
apt-get update retrieves a new list of software packages from the Debian repository
apt-get upgrade -y downloads and installs all updated software and automatically answers yes to all questions
apt-get dist-upgrade -y installs a new UNIX kernel (when available) and automatically answers yes to all questions
apt-get autoremove -y removes any unused software packages and automatically answers yes to all questions
apt-get autoclean deletes any old software archive files from previous apt-get sessions
apt-get clean deletes any downloaded software archive files from previous apt-get sessions
4. Once the NVR has rebooted re-login via SSH.
5. Install screen for terminal managemement
# apt-get install screen
6. Initiate a screen
7. Download the latest Debian package:
# wget http://dl.ubnt.com/firmwares/unifi-video/3.1.1/unifi-video_3.1.1~Debian7_amd64.deb
*Note, at the time of posting this is the latest version but check the UniFi Video Software page for the latest version.
8. Purge the current AirVision Software
# sudo apt-get remove --purge airvision
# sudo apt-get purge airvision
9. Initiate the new package install:
# dpkg -i unifi-video_3.1.1~Debian7_amd64.deb
10. Once the process completes you can login to your AirVision controller using http://ip-address:7443/
Default installations of Microsoft Internet Explorer 11 on Windows Server 2012 and Windows Server 2012 R2 do not permit files (e.g. .exe) to be downloaded from untrusted websites. An error will occur similar to "Your current security settings do not allow this file to be downloaded."
By design, Internet Explorer on hardened servers does not permit downloads without modifying the default IE security policy. To modify this (temporarily or permenantly) do as follows:
1. Open Internet Explorer
2. Navigate to the 'Tools' menu (top left, cog)
3. Click 'Internet options'
4. Click the 'Security' tab
5. Click 'Internet' then 'Custom Level'
6. In the settings zone, find the ‘Downloads’ heading.
7. Under 'Downloads' the ‘File Download’ option should be visible to you. Select Disable.
8. Click OK and Exit. Restart Internet Explorer.
You will now be able to download files from untrusted websites. Please note that it is not recommended to leave this setting in place on production servers.
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.