kubasiatkowski / SCCMChoco

GNU Lesser General Public License v3.0
44 stars 14 forks source link

Use with internal repository #4

Open rkase3 opened 6 years ago

rkase3 commented 6 years ago

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

rkase3 commented 6 years ago

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