![]() Really not a lot to it but solved a big problem for me, hopefully you will find it useful. Let’s check out an example using this function: In this case, the TOOLS.T00 file at the root of the media is in fact a. My personal use case was to extract a copy of VMtools direct from ESXi media. ![]() In the end, a C# snippet written by Eric Freed offered up an alternative, check it out here.Īfter a bit of tinkering, I was able to wrap this up into a PowerShell function which can be found here. Also a decent option, but introduces a dependency on OS version, and I’d rather not be calling out to CLI tools if I can help it. Note that the extraction procedure will replace any file that matches the file name of the archive. Secondly, if you have a later build of Windows 10 or Windows 2019, there is a native tar command. Run the following command to extract the TAR.GZ file cd / Desktop / testDir / tar -xzvf Here, all the options are just the same as before. I decided not to go this route as it was overkill for my scenario and introduced a dependency on another external module. Click the Extract button to open TAR.GZ files. I tested this briefly and it works well for this purpose, and does a lot more besides. You can also overwrite all files by selecting the Overwrite All Files option. ![]() Potential Alternativesīefore attempting to roll my own, I did look at a couple of potential options:įirstly, the rather excellent looking 7Zip4PowerShell module. However, I wanted a simple, native function with no dependencies, so keep reading to see what I’ve come up with. If you are in this scenario there are potentially a couple of options around this which I’ll cover off. ![]() tar.gz file during the automation process. On one of my projects recently, I had cause to extract a. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |