Month: September 2011

Listing Windows Updates

There is a not widely known COM object that you can use to list all the installed Windows Updates on a machine. Here is the code: $Session =...

read more

Extracting Icons

To extract an icon from a file, use .NET Framework methods. Here is a sample that extracts all icons from all exe files in your Windows folder (or...

read more

Clean your TEMP folder!

When disk space gets low, you may want to clean up your temporary folder. The code deletes all files that are older than 30 days to make sure...

read more

Office365 Cmdlets

Office365 comes with a complete set of PowerShell cmdlets. To review the cmdlets and what you can do with them, visit this URL:...

read more

Creating Local Admins

Here is a piece of code that will create a local user account and put it into the local Administrators group: $computername = $env:computername #...

read more

Bulk Renaming Files

Rename-Item can rename hundreds of files in one step. Have a look: $global:i = 1 dir c:\test1\ -Filter cover*.jpg | Rename-Item -NewName {...

read more