Register-PSRepository:The specified Uri'https://localhost:8080/artifactory/api/nuget/custom_repository'forparameter'SourceLocation'is an invalid Web Uri.Please ensure that it meets the Web Uri requirements.
Running the same on Windows Powershell 5.1 works.
Now, let see why it’s not working on Powershell Core.
Trying to find more details about the error message:
PowerShell
1
$Error[0]|Select-Object*
PowerShell
1
2
3
4
5
6
7
8
9
10
11
12
13
14
PSMessageDetails:
Exception:System.ArgumentException:The specified Uri'https://localhost:8080/artifactory/api/nuget/custom_repository'forparameter'SourceLocation'is an invalid Web Uri.Please ensure
that it meets the Web Uri requirements.
at System.Management.Automation.MshCommandRuntime.ThrowTerminatingError(ErrorRecord errorRecord)