PowerSHell script running and reference to ZIP file

Varma 1,495 Reputation points
2024-03-03T13:54:22.2566667+00:00

I am looking for 1 folder and 1 test ps1 file

test.zip

test.ps1

here test.ps1 referance to test.zip file while executing, that meas .zip file has execute able file.

Could you please give me any test zip folder and test powershell script which and any test software is fine. Please assist on this, thank you

Windows for business Windows Server User experience PowerShell
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. MotoX80 36,291 Reputation points
    2024-03-03T16:44:37.24+00:00

    Using the Windows explorer, just right click any file/folder and select "Compress to ZIP File" to create a zip file with the contents that you want.

    To extract the contents of a zip file with Powershell use the Expand-Archive cmdlet.

    https://theautomationcode.com/how-to-extract-a-zip-file-with-powershell

    Or use Powershell to create a zip file.

    https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.archive/compress-archive?view=powershell-5.1

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.