Hello @Annette F
Have you opened powershell executing as administrator? If it succeeds ReturnValue will be 0.
The command should be run on the RD Licensing server with everything running as normal.
I also recommend you contact the Clearinghouse by telephone and ask them to assist you with remove your RDS CALs.
Locate the Microsoft Clearinghouse Telephone Number for Your Country or Region
https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/cc754874(v=ws.10)
Best Regards
Karlie
----------
If the Answer is helpful, please click "Accept Answer" and upvote it.