Reputation: 38228
For example when launching
Get-PackageProvider -Name Chocolatey
You'll have to answer Yes.
How to launch from Batch file without requiring to answer Y ?
Upvotes: 0
Views: 487
Reputation: 19684
According to the Get-PackageProvider
cmdlet documentation, you can skip the prompt by using the -ForceBootstrap
switch:
PS C:\> Get-Help -Name Get-PackageProvider -Parameter ForceBootstrap
-ForceBootstrap [<SwitchParameter>]
Indicates that this cmdlet forces Package Management to automatically install
the package provider.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
Upvotes: 4