Above is a small snippet from the code. My goal is to just remove the weak reference element. I'm able to access the weak referenced element using PowerShell but when i try to remove, it removes the original element. Also, i tried -DeleteAllReferences, as the name says it removes all the references which is not what i wanted. I wanted to remove only a one reference which doesn't align with my IF conditions.