AndrewPla / TOPdeskPS

PowerShell module to interact with the TOPdesk API
MIT License
30 stars 12 forks source link

Invoke-TdMethod won't upload files on PowerShell 7.x #120

Closed mabster closed 2 years ago

mabster commented 2 years ago

I've been wracking my brain trying to figure out why Send-TdIncidentFile wasn't working on PowerShell Universal, and as a last resort I came here to look at the code.

Send-TdIncidentFile calls Invoke-TdMethod with a -File parameter, and Invoke-TdMethod has a switch against the current PowerShell version. It only does something for version 5 and 6.

PowerShell Universal is running PowerShell 7, so the function does nothing. No error, no output.

Can we get support for PowerShell 7 added to the Invoke-TdMethod function please?

AndrewPla commented 2 years ago

I've put the help wanted tag on this. Unfortunately, I don't currently use TOPdesk, but am open to contributions on this issue.