PowerShell - Finding Built-In Cmdlets
In times where cmdlets can originate from all kinds of modules, it sometimes becomes important to find out which cmdlets are truly built into PowerShell and which represent external dependencies.
Research and Development
In times where cmdlets can originate from all kinds of modules, it sometimes becomes important to find out which cmdlets are truly built into PowerShell and which represent external dependencies.
There are various ways to determine the IP address that is assigned to your machine. Here is a rather unusual approach that uses text operators to filter the information out of the results provided by ipconfig.
If you want to create your own custom objects, for example, to enable your functions to return rich objects, you can always use Select-Object cmdlet.
To find open files on a remote system, use openfiles.exe and convert the results to rich objects.
Sometimes, you know the information you are after is present in some object property, but there are so many properties that it is a hassle to search for the one that holds the information.
When you save Excel spreadsheets to a CSV file, special characters get lost. That's because Excel is saving the CSV file using very simple ANSI encoding.
If a console application or script has changed the console colors and you want to reset them to the default colors defined in your console properties, try this.
In PowerShell, you can directly access raw licensing data.
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.