PowerShell - 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.
Research and Development
There is a not widely known COM object that you can use to list all the installed Windows Updates on a machine.
To append a CSV file with new data, first of all make sure the type of data you append is the same type of data already in a file (or else column names will not match).
If you need to get two random numbers from a given numeric range, and you want to make sure they cannot be the same, simply tell Get-Random cmdlet to pick two numbers, and assign them to two different variables at the same time
The Get-Process cmdlet returns a lot of information about running tasks but it does not return the process owners or the session a process is logged on to.
Let's assume your script wants to share status information via a balloon message in the system tray area. Here is a sample code.
To extract an icon from a file, use .NET Framework methods. Here is a sample code that extracts all icons from all exe files in your Windows folder (or one of its subfolders).
As of PowerShell v3, Get-ChildItem cmdlet is smart enough to filter files and folders for you.
In PowerShell v3, Restart-Computer cmdlet now has a number of useful new parameters. For example, you can restart a remote machine and wait for the reboot process to finish.
The new PowerShell ISE script editor in PowerShell v3 lets you customize a lot of colors, so if a particular color does not show well on a projector, for example, simply change it.
Here's a quick and fast way of generating relative dates in any format.