Forum Discussion
dmarquesgn
Aug 20, 2024Iron Contributor
Use powershell to add a tag to a MS Defender device
Hi, I'm automating some security tasks with the help of powershell. One of the things I'm trying to automate now is the creation of a tag on a Defender device, but didn't found much info abo...
jbmartin6
Aug 22, 2024Iron Contributor
Great that it is working! I had a similar experience trying to run hunting queries using the API, there were some character escapes needed but then sometimes it still failed. I'm sure there is some technical wrinkle of strings or powershell that we are missing.
dmarquesgn
Aug 22, 2024Iron Contributor
Well, this is really odd. I had it working, but of course it was in an area of the script for testing. Then moved the code to the correct area of the script and today went to test the full script and it's not working again, prompting the same error of the "InvalidRequestBody".
So now I'm not really sure what is the problem, but it's not working anymore and don't have a clue why.