During lunch with a colleague we started talking about how it would be really nice to be able to reload the current PowerShell session when working in the console. For those of us using the brilliant ISESteroids, this functionality have been available for ISE users for a little while now. (more…)
Month: May 2015
Convert-Temperature
This function lets you convert between different units of temperature. (more…)
Getting the data types of elements in an array
Arrays in PowerShell are quite forgiving. They are easy to declare, and they can contain elements of different types if you want to. You can quite easily check to see if an object is an array or not, but have you ever needed to check the types of the elements inside the array itself? (more…)
ConvertTo-Digits
Convert an integer into an array of bytes of its individual digits. (more…)
Adding SizeOnDisk to FileInfo
The FileInfo object is great, with lots of useful information. But there is one piece of information I miss, and that is the SizeOnDisk information that we are used to from Windows Explorer. Well, let’s do something about that, shall we? (more…)
Invoke-DosDir
The quest for speed – Finding files
A while back I wrote a post about handling files in PowerShell. In it I describe the different ways you can read and write files. You can read it here if you like: Working with files in PowerShell. This time I will discuss how to find files. You have undoubtedly been in a situation where you need to locate a file on your disk, but didn’t know exactly where to look. Or perhaps you need to get all log-files in a share? Or document how many mp3 files you find on the server hosting all your users profiles? (more…)
Convert TimeZone to DateTime
These two small functions can be used to convert a specific Time Zone into a DateTime object. The returned DateTime object represents the current time in the specified Time Zone. This can be useful if you need to know what time time is right now in a different Time Zone. (more…)