I had a good look through the PowerShell Connection Tools Module - Microsoft.WindowsAdminCenter.ConnectionTools.psm1 found in C:\Program Files\WindowsAdminCenter\PowerShellModules\Microsoft.WindowsAdminCenter.ConnectionTools and found multiple errors:
- Some very basic inconsistencies in variable names
- Logical errors in the order of some lines
- Mistakes in the names of functions being called
- Missing parameters being passed to functions
- Responses not being returned from some functions
The sum of all of this is the script barely worked at all!
I have made necessary corrections and also set the AccessKey parameter to not mandatory. My version of the script now works to import and delete connections for those using Kerberos.
I am staggered that this script has been put in to production by Microsoft. It really is quite appalling how broken it is and how easy it would have been to check and fix the script by the developers!