Not critical, but If an asset note has more than one line adding to the notes causes a 401 forbidden error. Also writing more than one line to notes causes the same issue. Both situations are basically the same function since in one case you're writing back multiple lines that were fetched and in the other case you're writing multiple original lines.
Examples: (
$asset_notes = $existing_notes + " Windows product key: " + $key
- works if only one existing line in asset notes. if more than one line - 401 forbidden
$asset_notes = $existing_notes + "`r`nWindows product key" + $key
- 401 forbidden (backtick r backtick n creates a new line in powershell)
Sending the lines in string format times out.