Hello
I am looking to run the following command without user input and automacally accept
Install-Module -Name PSWindowsUpdate -Force
The issue is it requires you to press Y or A to accept,
PS C:\WINDOWS\system32> Install-Module -Name PSWindowsUpdate -Force NuGet provider is required to continue
PowerShellGet requires NuGet provider version ‘2.8.5.201’ or newer to interact with NuGet-based repositories. The NuGet
provider must be available in ‘C:\Program Files\PackageManagement\ProviderAssemblies’ or
‘C:\Users\dumb.dumb\AppData\Local\PackageManagement\ProviderAssemblies’. You can also install the NuGet provider by
running ‘Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force’. Do you want PowerShellGet to install
and import the NuGet provider now?
[Y] Yes [N] No [S] Suspend [?] Help (default is “Y”):
I found -Confirm but could not figure out how to add that to the command so when i run it it will automatically install the module and not require user input something like
Install-Module -Name PSWindowsUpdate -Force -Confirm “Y”
Thank you for any input.
Dennis