PanosGreg / Invoke-AzCommand

A wrapper around Invoke-AzVMRunCommand to make it behave like Invoke-Command
2 stars 1 forks source link

.bat file stream problem for BASE64 converter #1

Open czechdude opened 1 month ago

czechdude commented 1 month ago

Hi Panos, great job here! I found out that when a .bat file with echo is called in the VM, then the cmdlet fails on base64 method:

`##[error]Exception calling "FromBase64String" with "1" argument(s): "The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters."

[error]PowerShell exited with code '1'.

`

the session on the VM shows:

[{"version":"1","timestampUTC":"2024-07-18T09:26:06.6476683Z","status":{"name":"RunCommand_23","operation":"Command Execution Finished","status":"success","code":0,"formattedMessage":{"lang":"en-US","message":"Finished executing command"},"substatus":[{"name":"StdOut","status":"success","code":0,"formattedMessage":{"lang":"en-US","message":"C:\\autodeploy\\scripts>call \"C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\condabin\\conda.bat\" activate arcgispro-py3-clone   && EXIT /b   || \"C:\\Program Files\\ArcGIS\\Pro\\bin\\Python\\Scripts\\conda.exe\" create --clone arcgispro-py3 --name arcgispro-py3-clone --pinned --yes   || echo ERROR cloning   && exit /b \nH4sIAAAAAAAEAO1ZW1PjNhR+70z/g8YPpZ0SWXYc59IkHTbZ3aG7UIZk2wfCUMUWiRbb8khylvDrexyTxjEObGAHFkpgiJHOTed835HGav85/qzQX0wqLqKOYWELE2wZ6DIMItUxplrHLdNU3pSFVOGQe1Ioca6xJ0IzFl9Ab8qCwLQJcUziGN0ff0CoDTbRMTvf9zsGyYZgcHh4Yywd7Q7mSrMQgw7z9Mlp2xyWzO5JSeflU5niag6eDpePHwc5jVxU1iqCtcjWxvNODmhEJyxkkcZ7iRYh1ZAuDGkbC8WOmSekn4/ua5T3o3Mhs2ca3GWiuMjCQjNhMdCSR5OuTCLEI6VpEKBYChQrC2SXszmNg8G6uzfosGP8Lblm1ysDFUZDo6tlwtrmm3XpQSpdsoqzA6YULNgoD6TMZ5mVAZOcBvyK7Ucz4S3mUjGje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SaMFr+MVOs17Qyl9LFXxlWtbi3U3xWmsTXtDKF7FJQWsooPyt0nVd+2pg18pF2DaXt71L7C6+Vfdfkww/H+MeAAA="}},{"name":"StdErr","status":"success","code":0,"formattedMessage":{"lang":"en-US","message":""}}]}}]
PanosGreg commented 1 month ago

Hi Petr, might be best if we can connect in a Zoom call to have a look, as it's going to be much faster then back-n-forth messages here. I can send you a zoom link if that's OK

czechdude commented 1 month ago

hi Panos, next monday/tuesday would be fine. Thank you

čt 18. 7. 2024 v 18:20 odesílatel Panos Grigoriadis < @.***> napsal:

Hi Petr, might be best if we can connect in a Zoom call to have a look, as it's going to be much faster then back-n-forth messages here. I can send you a zoom link if that's OK

— Reply to this email directly, view it on GitHub https://github.com/PanosGreg/Invoke-AzCommand/issues/1#issuecomment-2237016901, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAES5IIXMAIPVLEUIEZG4QDZM7TOTAVCNFSM6AAAAABLCX4V52VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMZXGAYTMOJQGE . You are receiving this because you authored the thread.Message ID: @.***>

PanosGreg commented 1 month ago

Sure thing, next Monday 29-Jul-2024, I'll paste the zoom link here then.

I'm in Dublin Ireland so I'm on UTC+1 time zone.

PanosGreg commented 1 month ago

Hey Petr, yeah sure thing, was going to ask you the same actually.

13:00 works for me, I'll paste the zoom link here later today when the time comes.