Today I came across a post about pinging a list of computers and send the results as a table via Outlook. Brian is a very smart Active Directory guy so I offered some PowerShell suggestions to make his task even easier. Obviously you can only offer so much in a blog comment, so I thought…
Tag: PowerShell
Friday Fun – Get Ranked Object
Earlier this week on Google Plus, Hal Rottenberg posted a PowerShell idea he had. His goal was to identify a group of objects that would be statistically significant. For example, given a collection of files, group the files by size but ranked by size so that you might have a group for the largest files,…
Updating Multi-Valued Active Directory Properties Part 2
A few weeks ago I posted about updating multi-valued attributes in Active Directory. Part 1 covered how to accomplish this in PowerShell using ADSI. In Part 2 I’ll show you how to accomplish this using the free Active Directory cmdlets from Quest Software. As you’ll see, the over all process isn’t that much different. Except…
Friday Fun Is It Today?
I was testing out the PowerShell cmdlets that ship with Backup and Replication from Veeam Software. I was using the cmdlet to return backup jobs and realized I needed a way to only get those objects where the date was today. Because the property was a complete date time object, I couldn’t simply check if…
Friday Fun Drive Usage Console Graph
I think you’ll like this. Normally, I prefer my PowerShell commands to write objects to the pipeline. But there’s nothing wrong with sending output directly to the console, as long as you know that the output is intended only for the screen. What I find frustrating is the use of Write-Host when really, pipelined objects…
Updating Multi-Valued Active Directory Properties Part 1
Yesterday on Twitter, I got a tweet from @Docsmooth regarding how to update a multivalued property in Active Directory. There are a number of ways to handle this, especially from PowerShell naturally, so I tweeted one way in a series of tweets. But that’s a hard way to learn something, and anyone jumping in the…
Background Performance Counters
Windows Powershell makes it relatively easy to collect performance counter information via the Get-Counter cmdlet. Because I’m assuming you want to collect more than a few seconds of performance information, you’ll need to take advantage of PowerShell background jobs if you want your prompt back. Of course, you can always open a second session, but…
Add WhatIf Support to Your PowerShell Scripts
In one of my recent articles for SMB IT, I included a PowerShell module. In the article I referenced that I included support for -Whatif in one of the functions. I was asked on Twitter to explain what I meant and how it works. So here goes.
Friday Fun – A Christmas Prompt
Over the last few weeks I’ve read about other people’s PowerShell prompts and offered a few suggestions of my own. This week’s Friday Fun creates colorful holiday prompt that counts down the number of days until Christmas.
Test-Subnet WinForm
Recently, I posted an entry on how to ping an IP subnet with PowerShell. Using objects in the PowerShell pipeline is a good thing. But sometimes we want a GUI and I figured the ping subnet script would make a good WinForm script.
Friday Fun – Get Number Object
You most likely know that I’m all about the object and the PowerShell pipeline. Everything in PowerShell is an object. Pipe something to Get-Member and you can discover all of the object’s properties and methods (ie its members). Some objects, like strings, have many methods but very few properties. Some objects, like numbers have very…
Finding Files in the Path – A Pipeline Perk
I’ve been chipping in on a forum post about finding if a given file exists in any folder within the system environmental %PATH% variable using Windows PowerShell. There are several ways you might approach this. But the best way in my opinion is to leverage the PowerShell pipeline. Perhaps you don’t really need the solution…
WMI PowerShell Tricks for Windows Server…
WMI PowerShell Tricks for Windows Server Management* My first article for @petri_co_il on WMI PowerShell Tricks http://bit.ly/rx1YrD Get-WMIObject – PowerShell Tricks Windows Server Management Get-WMIObject in Windows Powershell makes it easier to utilize Windows Management Instrumentation (WMI) and makes managing windows servers much easier.
Domain Controller PowerShell Prompt
The other day I passed on a tweet I came across about creating a PowerShell prompt that displayed the domain controller that authenticated you. The original post was in a NetApp forum. Later I realized what was posted was something specific to NetApp’s PowerShell Toolkit. But you can use the same idea in a regular…
Turning IPConfig DNSCache into PowerShell
Lately I’ve been writing about techniques to turn command line tools into PowerShell tools. Although I suppose the more accurate description is turning command line output into PowerShell pipelined output. The goal is to run a command line tool and write objects to the PowerShell pipeline so I can do other operations with them. Today…