VMware Cloud Community
julianwood
Enthusiast
Enthusiast

Unable to unzip PowerCLI on linux due to backslashes

I am downloading and wanting to extract PowerCLI to use on Linux.
 
It seems like the PowerCLI .zip file contains backslashes rather then forward slashes which causes unzip to error.
 
# unzip VMware-PowerCLI-13.0.0-20829139.zip 
warning: VMware-PowerCLI-13.0.0-20829139.zip appears to use backslashes as path separators
 
the unzip then fails
 
Apparently this is a previous bug in Microsoft.PowerShell.Archive https://github.com/PowerShell/Microsoft.PowerShell.Archive/pull/62 which should bre resolved
 
Anyone have any workarounds using linux unzip or even better, can someone on the PowerCLI team amend the archive creation process to resolve trhis.
http://WoodITWork.com
Labels (1)
Tags (2)
0 Kudos
1 Reply
LucD
Leadership
Leadership

You could try to use 7zip to fix the issue

7z rn VMware-PowerCLI-13.0.0-20829139.zip $(7z l VMware-PowerCLI-13.0.0-20829139.zip | grep '\\' | awk '{ print $6, gensub(/\\/, "/", "g", $6); }' | paste -s)

 


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos