Closed CFGTechAdmin closed 3 months ago
Does it show a warning when you use it when the empty file happens? What happens if you use -ErrorAction Stop ?
I cannot find the option to use -ErrorAction
JUst type it. DoWhatever -ErrorAction Stop -> it will workYou can than do try/catch on it and process any error
Hi There, I'm using your module within a Powershell script, on of the steps in the script decrypts a file with your module. If I use the right key the file is decrypted ok and creates the file (i.e. file.txt), however, if I use the wrong key, the module does not decrypt the file but it still creates an empty output file (i.e. empty file.txt). To validate success of the decryption I'm validating that the decrypted file has been created. Is there a way I can ask the module not to crete the empty file when it fails to decrypt the file?
Thanks for this module and your help with this issue!