MicrosoftDocs / Windows-Admin-Center-Ideas-and-Feedback

Windows Admin Center's hub for ideas and feedback.
Creative Commons Attribution 4.0 International
20 stars 9 forks source link

[Windows Admin Center] - Shared Connection PowerShell Behavior #12

Open juerchri opened 3 years ago

juerchri commented 3 years ago

Gateway Version: 1.3.2105.24004 (last few updates through auto-update functionality) running on Server2019 with latest patches

Steps to reproduce the behavior: Import CSV file with connections via "Import-Connection" cmdlet (specified Name, Server-Type, no Tags and "global" as groupID) - doesn't matter if -prune is used or not

Observed Issue

  1. PS-imported shared connections show between/as normal "personal" ones in "All Connections" screen
  2. PS-imported shared connections do not show in "shared connections" within settings of WAC
  3. in "all connections" no differentiation possible between "personal" and "shared connections" that are automatically imported via PS
  4. Not an issue if 1-3 is fixed: as they are imported but in between the normal connections, you can delete them but once page is reloaded they reappear
  5. Also not an issue if 1-3 is fixed (WAC seetings can be used then): Imported shared connections cannot be reset/deleted currently, importing an empty csv works though.

Additional troubleshooting info: When I set a personal connection in "all connections" and a shared connection in WAC settings and use "export-connection", the personal ones have no groupID and the shared one has tag "global", so export seems to work as expected but import is not differentiated.

Expected behavior

  1. PS-imported connections with tag "global" to be shown under the "Shared" dropdown in "All connections" overview
  2. PS-imported connections to be shown in "Shared Connections" under settings in WAC
  3. PS-imported connections can be deleted just as normal "Shared Connections"
AlsoPACMAN commented 2 years ago

I can confirm the above behaviour is still present on Version (1.3.2204.19002) on Server 2019 Standard with latest patches.

This bug is the only thing holding us back from using this in our environment fully so please let me know if I can provide any information to help diagnose the issue.

AlsoPACMAN commented 1 year ago

After updating to version 2211 (1.4.2212.08003), this bug is still present but now doesn't seem to import them to the 'Personal Connections' either. No errors in the Event Log. Event that does get created is below. User running it is full admin on WAC & the server. This was run locally on an elevated command prompt.

Pipeline execution details for command line: add-type @" .

Context Information: DetailSequence=1 DetailTotal=1

SequenceNumber=36

UserId=DOMAIN\USERNAME HostName=ConsoleHost HostVersion=5.1.17763.3770 HostId=5921e7b3-a5c0-4c09-9178-4cd93e4fe404 HostApplication=C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe EngineVersion=5.1.17763.3770 RunspaceId=1a101a0a-d9f0-41fe-b2c5-0d09aac41fba PipelineId=6 ScriptName=C:\Program Files\windows admin center\PowerShell\Modules\ConnectionTools\ConnectionTools.psm1 CommandLine=add-type @"

Details: CommandInvocation(Add-Type): "Add-Type" ParameterBinding(Add-Type): name="TypeDefinition"; value=" using System.Net; using System.Security.Cryptography.X509Certificates; public class TrustAllCertsPolicy : ICertificatePolicy { public bool CheckValidationResult( ServicePoint srvPoint, X509Certificate certificate, WebRequest request, int certificateProblem) { return true; } }"

If you need this reported on the WAC Community page as the support link now directs you to, please let me know or can this be moved over to be actioned. I'm surprised there aren't more comments as this seems a key part to shared admin tools. Happy to provide any more info that's needed

Possibly related, the import command with the '-prune' switch can take a much longer time that the normal command. Normal = 5-10 seconds With Prune = 5+ Hours