Share via


Lessons Learned

My drop-site for interesting snippets and tips. If it's useful to you as well, great!

Getting User Names for Processes

Sometimes, I am in awe at the PowerShell team.  Other times, I am stunned, but at their...

Author: timdunn Date: 08/08/2013

PowerShell Integration with Visual Studio 12

https://blogs.msdn.com/b/powershell/archive/2010/06/21/powershell-integration-into-visual-studio.aspx...

Author: timdunn Date: 08/05/2013

Enabling and Disabling Users

  All good things must come to an end.  Sometimes, users become ex-users.  Here’s a...

Author: timdunn Date: 07/30/2013

Exporting Event Logs in Server 2003

I still have to support a smattering of boxes that run Server 2003 (yes, it’s EOLed.  No,...

Author: timdunn Date: 07/05/2013

Why Use Approved Verbs?

PowerShell has a list of approved verbs such as Get, New, Test, and so forth. But, what if I wanted...

Author: timdunn Date: 07/03/2013

More Fun with Passwords

Given the sad frequency with which web sites get their password stores leaked, using the same...

Author: timdunn Date: 06/11/2013

Rehash: Testing for a 302 Redirect

This blog, like any journal, tracks my own personal growth. This means I get to revisit and rehash...

Author: timdunn Date: 06/10/2013

Rehash: Testing Web Pages Once More

I seem to be rehashing a lot of stuff.  The reason is that I’m trying to capture what I...

Author: timdunn Date: 06/03/2013

Setting Font in PowerShell.exe Window, Sort Of…

To change the font in the current PowerShell.exe window, copy-and-paste all but the last line from...

Author: timdunn Date: 05/31/2013

Importing and Removing Certificates

We knew it had to come to this. All these posts about examining .cer files, scanning for...

Author: timdunn Date: 05/29/2013

DFS (Distributed File System) Mountpoints Across Sites

DFS (Distributed File System) is a very use feature.  By normalizing the naming and presenting...

Author: timdunn Date: 05/28/2013

Getting Network Adapter Speed

TIMTOWTDI (pronounced ‘tim-toady’) is the Perl dictum, “There is more than one way...

Author: timdunn Date: 05/17/2013

Getting OCS 2007 Certs through WMI Revisited

Back in August 2012, I posted about getting certificates bound to Office Communication Server 2007...

Author: timdunn Date: 04/29/2013

Number of Processors vs. Number of Cores Revisited

Back in July 2011, I posted about getting the number of processors and cores and gave passing...

Author: timdunn Date: 04/26/2013

Certificate Chains

I seem to spend a lot of time typing about SSL certificates, don’t I? Well, I seem to spend a...

Author: timdunn Date: 04/23/2013

Hack(saw)ing the Surface Pro

I'm taking a break from PowerShell goodness to brag about my new MS Surface Pro. It's an amazing...

Author: timdunn Date: 04/12/2013

RDCman Config Files (*.rdg)

RDCMan is a godsend if you have to jump on multiple machines. It's a wrapper for mstsc.exe, the...

Author: timdunn Date: 03/25/2013

Futzing With System Variables

$Env:PATH is a common bane - you have a hundred machines, and you end up with fifty different...

Author: timdunn Date: 03/22/2013

Stopping Services Remotely and Recursively (But Without Recursion)

This one is actually fun because it reminded me of my Comp Sci. 101 days (the actual course number...

Author: timdunn Date: 03/21/2013

Adding a Timestamp to a Pipeline of Strings

If I'm doing something long-running, and I want it to know when various lines of output are...

Author: timdunn Date: 03/20/2013

Batch-Getting BIOS Serial Numbers

Our lab maps hosts to KVM Ports based on, not hostname, not IP address, but the BIOS Serial Number....

Author: timdunn Date: 03/19/2013

Batch-Getting IP Addresses

Let's say you have a list of hostnames and need IP addresses for them. "You have a list of...

Author: timdunn Date: 03/18/2013

When Were These Computers Last Rebooted?

Here's a short one.  We want to know when this box was last rebooted.  Sure, it's in the...

Author: timdunn Date: 03/15/2013

Removing Monitoring Agents (Not Really)

Thanks to my coworker Keith Munson for the core logic. This post is written around the task of...

Author: timdunn Date: 03/14/2013

Getting Computer Memory Usage

Here’s a quick spot-check on the memory usage on remote computer (or a few dozen computers). ...

Author: timdunn Date: 03/13/2013

Fun with PSCredentials

Back in October of 2012, I posted Securely Storing a Password, which showed the key commands to...

Author: timdunn Date: 03/08/2013

Converting PsCustomObject To/From Hashtables

PsCustomObjects are effectively a superset of Hashtables. Hashtables have name-value pairs. The...

Author: timdunn Date: 03/05/2013

AppWiz.cpl in PowerShell

Every so often, I need to find an installed program. Until now, I’ve just been typing...

Author: timdunn Date: 03/04/2013

PSH V1 Get-Tail

In PSH V2, Get-Content –Tail 10 –Wait will display the last 10 lines of a file, then...

Author: timdunn Date: 03/01/2013

Get-FileVersion

With an endless stream of daily builds, it is essential that a test lab run the latest...

Author: timdunn Date: 02/28/2013

Getting An SSL Web Page’s Certificate

When it comes time to rolling SSL certificates on web servers, nothing beats checking the server to...

Author: timdunn Date: 02/27/2013

SQL Fun(ctions)

To start with, a disclaimer: I’m not a SQL person. No, not at all. I just find myself...

Author: timdunn Date: 02/20/2013

Removing Null Values

How many times have you gotten a WMI-Object and had to scroll through screens of null values? Here's...

Author: timdunn Date: 12/03/2012

Another Way to Create NoteProperty Entries

We've seen the Select-Object synthetic property method and the Add-Member -name AddNoteProperty...

Author: timdunn Date: 11/21/2012

Securely Storing a Password

Here's the scenario: You have a script that needs to access a static password which has to be stored...

Author: timdunn Date: 10/24/2012

Why Semi-Colons?

Sorry, no code here. Just a quick thought. Q: Why should I put semi-colons at the end of lines?...

Author: timdunn Date: 08/13/2012

Laziness and XML: New-XmlElement

I love structured data. I love how orderly it is, how logical. However, I do not like the...

Author: timdunn Date: 08/09/2012

Out-Error, the User-friendlier Write-Error

Write-Error is a pretty daunting cmdlet. It dumps some pretty useful information to screen. Useful,...

Author: timdunn Date: 08/08/2012

One-Liner: Dotting in vs. Running a Script

PowerShell scripts are a collection of functions and procedural code, right? So often, I find myself...

Author: timdunn Date: 08/07/2012

Getting OCS 2007 Certs through WMI

We recently had an interesting adventure where we needed to do an audit of the certificates used by...

Author: timdunn Date: 08/06/2012

Creating a Multi-Host Cert MMC

MMCs are a mixed blessing at best. The saved .msc files aren't human-editable (read: not XML) so I...

Author: timdunn Date: 07/30/2012

Dumping ILO (and Other DHCP Addresses)

Here's a quick-n-dirty script that dumps ILO address from the DHCP server. function Get-Ilo { param...

Author: timdunn Date: 07/25/2012

RSA Authentication Manager User Auditing

RSA Authentication Manager exports the list of users and SecurID fobs in a text format with...

Author: timdunn Date: 07/06/2012

Clock Skew and You

We had an issue where the clocks on various hosts got offset beyond the margin allowed by an...

Author: timdunn Date: 02/15/2012

Set-ExecutionPolicy Fun

Hm, I'm surprised this isn't included Out-Of-The-Box. Let's say I have a new deployment of machines...

Author: timdunn Date: 02/14/2012

Batch-Unzipping Files

Thanks to https://serverfault.com/questions/18872/how-to-zip-unzip-files-in-powershell/201604#201604...

Author: timdunn Date: 11/05/2011

Displaying an OCS Proxy Server's List of Trusted Servers

Yesterday, we covered how to dump an OCS Edge Server's list of trusted servers, including using...

Author: timdunn Date: 11/03/2011

Certificates Owned by a Service

PowerShell gives you access to certificates in many ways. You can read it in from a file, or look at...

Author: timdunn Date: 11/01/2011

<Previous Next>