Tag: Convert

#PSTip Converting .NET types to CIM types and vice versa

Note: This tip requires PowerShell 3.0 or above. If you get a list of CIM class properties you’ll notice the…

Read More

#PSTip Parsing Exchange size strings

You have been tasked to generate a report of mailbox sizes and you quickly write the following: A week after,…

Read More

#PSTip Converting a String to a System.DateTime object

In a perfect world all date and time data available are represented by System.DateTime objects. In the real world we…

Read More

#PSTip Converting numbers to binary and back

To convert a number to its equivalent binary string representation, use the Convert.ToString method with a base of 2. To…

Read More

#PSTip Converting numbers to HEX

PowerShell can convert Hexadecimal numbers on the command line, just prefix the value with ‘0x’: Converting a number to HEX…

Read More