PowerShell - Downloading Files from Internet
PowerShell v3 comes with a hugely useful new cmdlet called Invoke-WebRequest. You can use it to interact with websites which also includes downloading files.
Research and Development
PowerShell v3 comes with a hugely useful new cmdlet called Invoke-WebRequest. You can use it to interact with websites which also includes downloading files.
When disk space gets low, you may want to clean up your temporary folder. This code deletes all files that are older than 30 days to make sure you're not dumping anything that's still needed.
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.