But that's not what the error message says. Translation: "=" missing after a key in the hashliteral
.
You said you want to do this: set-aduser -Remove @{msds-sourceanchor = "xxxxx"}
, but you've done this: set-aduser -Remove @{msds-sourceanchor}
What you need to do is this: @{"msds-sourceanchor" = "xxxx"}