-
Notifications
You must be signed in to change notification settings - Fork 161
Open
Description
'The URL of the JumpCloud command to import into a JumpCloud tenant.' see
[Parameter(ParameterSetName = 'URL', Mandatory, Position = 0, ValueFromPipelineByPropertyName = $True, HelpMessage = 'The URL of the JumpCloud command to import into a JumpCloud tenant.')] |
command:
Import-JCCommand -URL "http://localhost:9000/JumpCloud_Commands/Mac%20Commands/Mac%20-%20List%20additional%20routes%20from%20vpn.md"
error and stacktrace:
Invoke-WebRequest: /home/username/.local/share/powershell/Modules/JumpCloud/2.2.0/Private/NestedFunctions/New-JCCommandFromURL.ps1:20
Line |
20 | … UrlInvoke = Invoke-WebRequest -Uri $rawUrl -UseBasicParsing -UserAgen …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 400: Invalid request
InvalidOperation: /home/username/.local/share/powershell/Modules/JumpCloud/2.2.0/Private/NestedFunctions/New-JCCommandFromURL.ps1:24
Line |
24 | $Name = $content[0].Groups[2].Value #Name
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot index into a null array.
InvalidOperation: /home/username/.local/share/powershell/Modules/JumpCloud/2.2.0/Private/NestedFunctions/New-JCCommandFromURL.ps1:25
Line |
25 | $commandType = $content[1].Groups[2].Value #CommandType
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot index into a null array.
InvalidOperation: /home/username/.local/share/powershell/Modules/JumpCloud/2.2.0/Private/NestedFunctions/New-JCCommandFromURL.ps1:26
Line |
26 | $Command = $content[2].Groups[3].Value #Command
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Cannot index into a null array.
reason:
support/PowerShell/JumpCloud Module/Private/NestedFunctions/New-JCCommandFromURL.ps1
Lines 17 to 18 in a3ddab0
$httpUrl = $GitHubURL | Select-String -Pattern "\bmaster.*$" | % { $_.Matches } | % { $_.Value } | |
$rawUrl = "https://raw.githubusercontent.com/TheJumpCloud/support/$httpUrl" |
URL is transformed and not a general URL is expected as described by help text.
Could you allow to import JC Commands from different URLs?
Metadata
Metadata
Assignees
Labels
No labels