Archive for the ‘powershell’ Category

Logon UI Background Changer Revisited

In a recent Hak5 episode (704, at 9 minutes) they covered changing the Logon UI background, which reminded me of my own little script.
Since last working the script, I’d like to think I’ve learned more and it was about to time clean up the code and make it a little more user friendly. It still [...]

Of IPs & Subnets

While if you look, there are tools to calculate a IP subnet/address range, they all seem to rely on string splitting and converting the address to binary manually. Which I think is bulky, hard to maintain, and more importantly, not that elegant. So pulling to mind my Cisco CCNA classes where my instructor would drill [...]

Restoring Hyper-V VM with snapshot tree

For whatever reason, you’ve lost your virtual machine settings in Hyper-V and it just so happened they are snapshots. I sure hope that this was a test server and not a production one! Tsktsk! By now, you’ve probably scoured the interweb searching for a cure, and you’re in luck, you’ve found a way to get [...]

My first cmdlet, Out-Web

It’s been a while since I’ve done a for fun computer project, so I decided I wanted to learn how to make PowerShell Cmdlets. The problem was that I couldn’t think of really anything I wanted to make! Then one day I was reading Lee Holmes’ blog, saw the “Out-Web” and had a project.
Download the [...]

Fixed: fastping, now with working get-help comments

After getting frustrated with my fastping not displaying anything after using get-help, I asked the twitterverse for help, and they did! Super-duper thanks to @djryan (twitter/web) for the pointers.

<#
.SYNOPSIS
Ping a node as fast as you can.
.DESCRIPTION
Whereas the ping.exe utility keeps steady at 1 ping per second,
this will ping with custom wait periods as low as [...]

Ping faster from powershell with FastPing!

I’ll let the code do most of the talking.
<#
.Synopsis
Ping a node as fast as you can.
.Description
Whereas the ping.exe utility keeps steady at 1 ping per second,
this will ping with custom wait periods as low as 0 milliseconds.
.Parameter ip
IP or hostname of network node.
.Parameter count
Number of pings to [...]

Finding applicable Windows Updates via cli

An ongoing project here at work is server maintenance and applying patches. One of the issue we’ve been facing is how to do windows updates for clusters. While we could do an AD structure and schedule different install and restart times for the different sides, we can’t include checks to see if the other side [...]

MS-SQL Powershell database backup

Recently one of our SQL clusters decided it was a good idea to not backup databases anymore. So today my boss told me to get something to bandaid the situation until we can fix the situation (which will likely be an upgrade/reinstall).
To learn more check out the MSDN pages on the Microsoft.SqlServer.Management.Smo namespace.

#
# Temp database backup
#
$d [...]

Windows 7 Powershell LogonUI Changer

Based off of the W7C LogonUI Changer, this Powershell script should make changing the LogonUI background easier for the IT admins out there.
Download win7logonui.zip (Includes the ImageProcessor source and DLL)
Usage:

After copying or building imageprocessor.dll move it to the same folder as win7logonui.ps1 (or edit the script).
Example: win7logonui.ps1 \path\to\image.jpg
Set $DebugPreference to “Continue” to watch the script [...]

Ad-hoc fileshares

A little concept I’ve been working on every now and again is ad-hoc shares. The reasoning behind it is that committees and other short lived inter-department groups need something to share documents with that can be backed up. Email can be a hassle and quickly fills quotas, IT staff probably hates the idea of users [...]