Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

Unzip not working



  • I am trying to Unzip a file on a remote machine which has a server type "Powershell Agentless" I am able to check if the file is present or not using "Ensure File" it also gives the output on the log that file is present. After that when the unzip block runs there are no output and no extracted data in the folder.

    If anyone knows what is wrong here kindly provide their feedback


  • inedo-engineer

    hi; please share your OtterScript and we might be able to get a better idea :)



  • I am using the in-built function from otter's visual config editor.

    Extract-ZipFile
    ( 
        Name: C:\Temp\test.zip,
        Directory: C:\Temp,
        ClearTarget: false,
        Overwrite: false
    );
    

  • inedo-engineer

    Thanks!

    So to be clear, is this in a "configuration plan" or an "orchestration plan"? Can you give some more context as to how you're trying to use this (i.e. why do you want to unzip)? Can you share the full plan?



  • Below you can find the image which will provide you all the details you want

    c3800867-106b-46fc-b1b0-e883b2c5238f-image.png


  • inedo-engineer

    Hello;

    What are you trying to do?

    This definitely won't work for several reasons.

    1. Ensure-File is an "Ensure" operation and will detect configuration drift and can optionally create the file if it doesn't exist; but in this case, it would be a 0-byte file named test.zip, which isn't a valid zip

    2. Extract-ZipFile is a "Execute-only" operation, which means it will run only within a block (e.g. { ... } ) if drift was detected (i.e. the file didn't exist in the operation before); but if that was the case, it would fail because it's not a valid zip file

    You probably want to use an Orchestration plan for this.

    Please read through this eBook to get feeling for how configuration and Orchestration Plans: https://inedo.com/support/resources/ebooks/windows-first-iac-cca


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation