< Back

Add-d00mChocolateyPackageSource

Mon Jan 13, 2020 8:30 am

NAME Add-d00mChocolateyPackageSource



SYNOPSIS

Add Chocolatey as a package source





SYNTAX

Add-d00mChocolateyPackageSource [[-ComputerName] <String[]>] [-Trusted] [[-Credential] <PSCredential>]

[<CommonParameters>]





DESCRIPTION

Adds Chocolatey as a package source on computers and

sets if its a trusted repository or not





PARAMETERS

-ComputerName <String[]>



Required? false

Position? 1

Default value $env:COMPUTERNAME

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-Trusted [<SwitchParameter>]



Required? false

Position? named

Default value False

Accept pipeline input? false

Accept wildcard characters? false



-Credential <PSCredential>



Required? false

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Add-d00mChocolateyPackageSource -Trusted



This example adds Chocolatey as a trusted package source

on the local computer









-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Add-d00mChocolateyPackageSource -ComputerName Computer1, Computer2



This example adds Chocolatey as an untrusted package source

on the remote computers, Computer1 and Computer2









-------------------------- EXAMPLE 3 --------------------------



PS C:\\>'Computer1' | Add-d00mChocolateyPackageSource -Trusted -Credential (Get-Credential)



This example adds Chocolatey as a trusted package source on

the piped in computer, Computer1, using the specified credentials











RELATED LINKS