PowerShell version of uptime command

I created a PowerShell advanced function that emulates the uptime command for Unix-like operating systems. The uptime command displays the current time, the length of time the system has been up, the number of users, and the load average of the system over the last 1, 5, and 15 minutes. uptime output: 21:33 up 7 days, 11:10, 2 users, load averages: 0.05 0.08 0.08 My function returns a custom PowerShell object, so we have the option to pass it to the pipeline for further processing and/or formatting....

May 10, 2010 · 3 min

SSH using Public-Key Authentication

Lately, I’ve been implementing a solution to make SSH connections more secure and manageable (i.e., getting away from password authentication). A couple of benefits public-key authentication has over the default password authentication is: Memorize only the passphrase of your private key rather than possibly dozens of username/password combinations for remote hosts. A password sent across the network, even protected by an SSH secure channel, can be captured when it arrives on the remote host if that host has been compromised....

March 29, 2010 · 2 min

Configure Inter-VLAN routing on a Cisco L3 Catalyst Switch

I recently had to configure Inter-VLAN routing at a client’s site. I don’t have to perform this task on a regular basis, so I figured I would make a post of a sample implementation for future reference. Ingredients used for this post: Cisco 2811 Router Cisco Catalyst 3560 Cisco Catalyst 2950 Steps Configure the Corp router. enable conf t int fa 0/1 description Link_to_L3SW ip address 172.17.17.9 255.255.255.252 no shut end copy run start Configure the Cisco Catalyst 3560 switch....

February 9, 2010 · 2 min

Install/Upgrade VMware Tools on Ubuntu Server

I routinely google this task whenever I have to install or upgrade the VMware Tools on a Linux VM guest. I figure I would make a post for future reference. Ingredients used for this post: VMware ESX Server 4.0 Ubuntu Server 9.10 Steps Use the vSphere Client to connect to a vCenter Server or directly to an ESX host. Right-click the virtual machine and select Open Console. Log into Ubuntu with an administrative account....

January 5, 2010 · 1 min

SSL VPN configuration for Cisco ASA with AnyConnect VPN client

This post is a guide to configure a Cisco Adaptive Security Appliance (ASA) device to perform remote access SSL VPN with the stand-alone Cisco AnyConnect VPN client. I followed a few tutorials on the web (including a couple of examples from the Cisco website), but I failed to implement a complete solution. The following recipe has been thoroughly tested and verified. Ingredients used for this post: Cisco 5500 Series ASA with software version 8....

December 12, 2009 · 2 min

Ubuntu TFTP

This post is a guide on how to create a TFTP server for Cisco device configuration backups on Ubuntu 8.10. 1. Install atftpd. sudo apt-get install atftpd 2. Configure atftpd as a separate server and modify the tftpboot location. Modify the file with a text editor. sudo vim /etc/default/atftpd Set the configuration. USE_INETD=true -> USE_INETD=false /var/lib/tftpboot -> /srv/tftpboot Save and exit. 3. Initialize the new configuration. sudo invoke-rc.d atftpd start 4....

November 21, 2009 · 1 min

First Post!!!

I thought I would submit my solution for the FizzBuzz test. I’ve used PowerShell and VBScript for the solution since the majority of my dev work is Windows scripting. FizzBuzz for PowerShell: for ($i = 1; $i -le 100; $i++) { if (($i % 3 -eq 0) -and ($i % 5 -eq 0)) { Write-Host "FizzBuzz" } elseif ($i % 3 -eq 0) { Write-Host "Fizz" } elseif ($i % 5 -eq 0) { Write-Host "Buzz" } else { $i } } … and VBScript...

October 25, 2009 · 1 min