Removing Notes from ADFS Relying Party with Set-AdfsRelyingPartyTrust PowerSell command?

293 Views Asked by At

I actually want to complete a simple task by PowerShell in ADFS 4.0: Setting a note for a relying party.

This actually works fine like this:

Set-AdfsRelyingPartyTrust -TargetName SomeRelyingParty -Notes SomeNote

The problem is, that I can't set it back to an empty string, because I get this eror message: Cannot validate argument on parameter 'Notes'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.

I also tried "" or $null as a parameter, which results in the same error message.

My workaround so far is setting " ", but still it is space character and not an empty string as I want it to be. Once a note is set, the only way to fully remove the note again, is by doing so in the ADFS user interface, I couldn't figure out, how to do this by scripting it.

Update

I still couldn't figure out a solution, so I contacted our Microsoft Principal Consultant, he came up with the solution setting backtick (`) and zero (0) under quotes (which I cannot write here, as backtick is also a stackoverflow syntax - however this is escpaed). Still there will be an "empty" String with the length of 1.

I think now, that this is actually a bug, so I asked him to contact the ADFS product team.

0

There are 0 best solutions below