Welcome to ThePowerShellGuy.com Sign in | Join | Help

March 2007 - Posts

New-TaskPool.ps1 - Threading the Powershell way Pt 2

I’ve made a few modifications to New-TaskPool. My original script couldn’t easily be loaded into your profile. You had to specify the script file ( .\New-TaskPool.ps1 ). This quickly became a problem as I would invariably be in the wrong folder and typing
Posted by Gaurhoth | (Comments Off)
Attachment(s): New-TaskPool.txt

Finding a Range of IP addresses

A recent question in Microsoft.public.windows.powershell asked for ideas on working with a range of IP addresses expressed in CIDR notation (192.168.1.0/24). The intent is to get a list of IP addresses inside the range. I posted a small sample in the
Posted by Gaurhoth | (Comments Off)
Filed under: , ,

Comparing Win32_PingStatus vs [System.Net.NetworkInformation.Ping]

Back again with another comparison between .NET and WMI performance. While WMI can be very useful and often the only way to accomplish some remote oriented tasks, you will rarely hear anyone that has worked with WMI classes for long brag about its performance.
Posted by Gaurhoth | (Comments Off)
Filed under: , ,

New-TaskPool.ps1 - Threading the Powershell way

For a while now I've been trying to perfect a script that will let me simulate having multiple threads in powershell. Here's what I've come up with. The entire script is attached to the post. I'll only be discussing a few bits and pieces today. Feel free
Posted by Gaurhoth | (Comments Off)
Filed under: ,

Attachment(s): new-taskpool.txt

"Gaurhoth's Powershell Thoughts" | move-blog

I wanted to start with a thanks to /\/\o\/\/ for letting me invade his site and set up my own blog here. I've posted the occassional blog entry at http://gaurhothw.spaces.live.com/ but wasn't happy with the interface for a number of uninteresting reasons.
Posted by Gaurhoth | (Comments Off)

Querying date based Active Directory fields

Another “from usenet to blog” entry. Someone wanted to a list of all users in their Active Directory created after a specific day. Like most AD related tasks, this is fairly easy in Powershell, but you do have to be aware of one tricky piece. LDAP queries

Listing Remote Services without using WMI

WMI seems to get recommended for most "remote" queries in powershell. This is due in large part because the get-wmiobject cmdlet includes built in support for querying remote machines. However, I've found that WMI can be slow and whenever I find a dotnet
Posted by Gaurhoth | (Comments Off)
Filed under: , , ,

Active Directory - Paged Queries

One question that has come up a couple of times in the newsgroup 'microsoft.public.windows.powershell' is how to get more than 1000 records from an Active Directory query, particularly when using get-adobject (from the Powershell Community Extensions