Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use with internal repository #4

Open
rkase3 opened this issue May 2, 2018 · 1 comment
Open

Use with internal repository #4

rkase3 opened this issue May 2, 2018 · 1 comment

Comments

@rkase3
Copy link

rkase3 commented May 2, 2018

Hello,

Great script. I am trying to use on internal repository with the -chocourl switch and getting a validation error. I have looked for places to change it from https://chocolatey.org to the address below. Any ideas?

Thanks,

Ray

Add-SCCMChocoApplication : Cannot validate argument on parameter 'chocourl'. The argument "http://sccm-01/chocopackages/Creative-Cloud/" does not match the
"^(https://chocolatey.org/packages/)" pattern. Supply an argument that matches "^(https://chocolatey.org/packages/)" and try the command again.
At line:1 char:36

  • ... oApplication -chocourl "http://sccm-01/chocopackages/Creative-Cloud/"
  •                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidData: (:) [Add-SCCMChocoApplication], ParameterBindingValidationException
    • FullyQualifiedErrorId : ParameterArgumentValidationError,Add-SCCMChocoApplication
@rkase3
Copy link
Author

rkase3 commented May 2, 2018

From the script:

#>
[CmdletBinding(DefaultParameterSetName="default")]
param(
[Parameter(Mandatory=$true)]
[ValidatePattern('^(http://SCCM-01/chocopackages)')]
[string] $chocourl = "http://SCCM-01/chocopackages",
[Parameter(ParameterSetName="DeployToUserCollection",Mandatory=$false)]
[string] $CMUserCollectionName,
[Parameter(ParameterSetName="DeployToDeviceCollection",Mandatory=$false)]
[string] $CMDeviceCollectionName,
[Parameter(Mandatory=$false)]
[string] $CMSiteCode="001",
[Parameter(Mandatory=$false)]
[string] $CMInstallDir,
[Parameter(Mandatory=$false)]
[string] $IconsDir = $env:temp,
[Parameter(Mandatory=$false)]
[string] $CMFolderName = "Choco",
[Parameter(Mandatory=$false)]
[switch] $WhatIf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant