## Creating a ZIP Archive with PowerShell Version <5.0

The PowerShell command “Compress-Archive” comes pretty handy when it comes to creating a .zip file/archive. Sadly it only available since PowerShell version 5.0. which comes with Windows 10 (can be installed on Windows 8.1 and Windows Server 2012 R2 as well, though).
No worries, there is a solution as well which works with Powershell <5.0. The following function requires the output filename e.g. "C:\temp\MyOutputArchive.zip" and the full path of the directory to be archived eg. "C:\temp\ToBeArchived\".

## Converting an IPv4 IP Address into a HEX String

The following function converts a given IPv4 IP address into an eight char hex string. Two hex chars in a row presenting eight bits of the IP address.

The idea behind it was to write a nice PowerShell function and to make the IP addresses easily sortable in a database.