Forum Discussion
Mandatory AccessKey parameter for Import-WACConnection Powershell cmdlet in 2410
Hello Michael,
Thank you for that creative idea, setting the AccessKey parameter to any value definitely helped with Export-WACConnection.
Unfortunately, with Import-WACConnection it did not, seems like the underlying REST API requires a valid access key for import:
Invoke-WebRequest : The remote server returned an error: (401) Unauthorized.
At C:\Program Files\WindowsAdminCenter\PowerShellModules\Microsoft.WindowsAdminCenter.ConnectionTools\Microsoft.WindowsAdminCenter.ConnectionTools.psm1:124 char:17
+ $response = Invoke-WebRequest @parameters
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommandAt least there's a hint where to look in the code, I will do some research there.
Regards,
Marc
Hello Marc,
you are totally right with the import per Powershell. But import is the easy way as it can be done in WAC itself via Settings - > Shared Connections -> Add -> Import List
Regards Michael
- edwardkranenburgFeb 13, 2025Copper Contributor
Hello Michael,
I tried importing them, but as soon as I refresh the site or try to open it in a other browser, none of the imported servers show up.
Is there a limit in the amount of servers that can be added in WAC v2.4.0?
I'm trying to load 157 servers from a csv file and haven't been able to properly import them as shared servers, that's why I started the PowerShell route to see if I had any more luck with that, but then ran into this AccessKey issue.
Cheers, Edward