Create a Visual Studio Project for your PowerShell Scripts

Are you eager to take advantage of Visual Studio PowerShell Tools? This video talks about how to create a Visual Studio Solution & Project to help you manage your PowerShell script files. If you’ve already got a set of one-off scripts, that doesn’t necessarily warrant a PowerShell module, but you …

Continue reading

PowerShell: Embed binary data in your script

When writing automation scripts or modules, you might find that you frequently reference external binary data. “Binary data? Well, that accounts for all data!” you might say. Yes, that’s true. But I’m talking about binary data as opposed to files containing simple ASCII or UTF-8 data. Maybe there’s some better …

Continue reading

Copy Filenames to Clipboard with PowerShell

Have you ever wanted to copy a large amount of data to the Windows clipboard, but haven’t known quite how to do it? How about this scenario: you have a folder full of files, and you want to get a list of the files’ full names / paths. That’s pretty …

Continue reading

PowerShell Module: Enable Wake for Devices

So in my last post, I shared a PowerShell script that enables you to enable devices to wake up computers. This script relies solely on a WMI interface, but despite the remote nature of WMI, I had provided no method of entering a remote computer name. That changes with the …

Continue reading

AutoIT: Enumerating all Windows

Here is a short script I wrote using AutoIT, which enumerates all of the windows, to the StdOut stream: ConsoleWrite(“Enumerating windows”) $AllWindows = WinList() ConsoleWrite(“Found ” & UBound($AllWindows) & ” windows”) for $i = 0 to UBound($AllWindows) – 1 ConsoleWrite(@lf & “Name: ” & $AllWindows[$i][0]) ConsoleWrite(@lf & “HWND: ” & …

Continue reading

Handy Process Management Utilities

Hey guys, I just wanted to share a couple of cool utilities to assist with managing processes. ImageCFG (http://www.robpol86.com/index.php/ImageCFG) ImageCFG is a utility that lets you tweak the CPU affinity of an executable. What does this mean? Well, if you have a multi-core system, or even a hyper-threaded (virtual multi-core) …

Continue reading

Deploying Windows 7 RSAT

If you’ve got a large number of Windows 7 machines that you’ve already deployed, but now need to silently deploy the Remote Server Administration Tools (RSAT), you’re in luck. It’s quite simple to do, and Microsoft provides the necessary tools to automate this deployment. The RSAT pack is downloaded as …

Continue reading

PowerShell: AD Workstation Cleanup Script version 2.0

Update (2010-08-25): I have posted a newer version of this script. A little while ago, I posted a PowerShell script that detects old machine accounts in Active Directory, and disables or deletes them, based on certain ages (in days). I’ve continued work on this script, such that it now logs …

Continue reading