Closed SujeevPachala closed 1 year ago
Hi,
I have been trying to replicate this but no luck yet.. are you able to find out which posh script it's failing on and check it manually in Intune?
How do I know which one is failing?
If you run the tool interactively from your terminal it should be the last powershell script that IntuneCD prints
Hi, were you able to check the above or can this issue be closed?
Describe the bug Can't backup and it seems a powershell query issue
To Reproduce ========================== Starting Command Output =========================== /usr/bin/bash /home/vsts/work/_temp/5d0345b5-1bbb-4453-a4e0-79bad8c341ae.sh Traceback (most recent call last): File "/home/vsts/.local/bin/IntuneCD-startbackup", line 8, in
sys.exit(start())
File "/home/vsts/.local/lib/python3.10/site-packages/IntuneCD/run_backup.py", line 313, in start
count = run_backup(args.path, args.output, exclude, token)
File "/home/vsts/.local/lib/python3.10/site-packages/IntuneCD/run_backup.py", line 273, in run_backup
config_count += savebackup(path, output, exclude, token)
File "/home/vsts/.local/lib/python3.10/site-packages/IntuneCD/backup_powershellScripts.py", line 68, in savebackup
decoded = base64.b64decode(script_data["scriptContent"]).decode("utf-8")
File "/usr/lib/python3.10/base64.py", line 80, in b64decode
s = _bytes_from_decode_data(s)
File "/usr/lib/python3.10/base64.py", line 45, in _bytes_from_decode_data
raise TypeError("argument should be a bytes-like object or ASCII "
TypeError: argument should be a bytes-like object or ASCII string, not 'NoneType'
[error]Bash exited with code '1'.