Command fails on remote PC because of Nuget provider prompt

3 views
Skip to first unread message

Wright, John M

unread,
Nov 3, 2025, 2:56:30 PMNov 3
to ntpowe...@googlegroups.com

I have a script with this line that’s executed by Invoke-command:

 

if ((Get-Module -Name AudioDeviceCmdlets -ea 0) -eq $null) { Install-Module -Name AudioDeviceCmdlets -Force -Confirm:$false; Import-Module -Name AudioDeviceCmdlets -ea 0 }

 

It’s part of a check to see that the target has the necessaries before using the AudioDeviceCmdlets module.  But it gets this prompt, and I can’t find a scripted way around it.  Any ideas?

 

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\jmwright\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  [?] Help (default is "Y"):

 

 

FWIW, I tried running this command first but it didn’t help:  if (! (Get-PackageProvider -name NuGet)) { Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force }

 

--

John Wright

IT Support Specialist

1800 Old Bluegrass Avenue, Louisville, KY 40215

502.708.9953

Please submit IT requests to Hazelwoo...@bluegrass.org

24 Hour Helpline 1.800.928.8000

  

CONFIDENTIALITY NOTICE: This message contains confidential information and is intended only for the individual(s) addressed in the message. If you are not the named addressee, you should not disseminate, distribute, or copy this e-mail. If you are not the intended recipient, you are notified that disclosing, distributing, or copying this e-mail is strictly prohibited.

 

Michael B. Smith

unread,
Nov 3, 2025, 3:00:18 PMNov 3
to ntpowe...@googlegroups.com

Installing and then importing the nuget package provider should work.

 

Do you get a different error?

--
You received this message because you are subscribed to the Google Groups "ntpowershell" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ntpowershell...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ntpowershell/SN7PR12MB671432EAAB6E197FF2C6FAC991C7A%40SN7PR12MB6714.namprd12.prod.outlook.com.

Wright, John M

unread,
Nov 3, 2025, 3:02:28 PMNov 3
to ntpowe...@googlegroups.com

No, not an error.  But I get another install prompt that I can’t get around. lol

 

--

John Wright

IT Support Specialist

1800 Old Bluegrass Avenue, Louisville, KY 40215

502.708.9953

Please submit IT requests to Hazelwoo...@bluegrass.org

24 Hour Helpline 1.800.928.8000

  

CONFIDENTIALITY NOTICE: This message contains confidential information and is intended only for the individual(s) addressed in the message. If you are not the named addressee, you should not disseminate, distribute, or copy this e-mail. If you are not the intended recipient, you are notified that disclosing, distributing, or copying this e-mail is strictly prohibited.

 

From: ntpowe...@googlegroups.com <ntpowe...@googlegroups.com> On Behalf Of Michael B. Smith


Sent: Monday, November 3, 2025 3:00 PM
To: ntpowe...@googlegroups.com

Subject: [ntpowershell] RE: Command fails on remote PC because of Nuget provider prompt

 

EXTERNAL EMAIL - This email was sent by a person from outside your organization. Exercise caution when clicking links, opening attachments or taking further action, before validating its authenticity.

Secured by Check Point

 

Installing and then importing the nuget package provider should work.

 

Do you get a different error?

 

From: ntpowe...@googlegroups.com <ntpowe...@googlegroups.com> On Behalf Of Wright, John M
Sent: Monday, November 3, 2025 2:56 PM
To: ntpowe...@googlegroups.com
Subject: [ntpowershell] Command fails on remote PC because of Nuget provider prompt

 

I have a script with this line that’s executed by Invoke-command:

--

You received this message because you are subscribed to the Google Groups "ntpowershell" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ntpowershell...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ntpowershell/SN7PR12MB671432EAAB6E197FF2C6FAC991C7A%40SN7PR12MB6714.namprd12.prod.outlook.com.

--
You received this message because you are subscribed to the Google Groups "ntpowershell" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ntpowershell...@googlegroups.com.

Wright, John M

unread,
Nov 3, 2025, 3:03:27 PMNov 3
to ntpowe...@googlegroups.com

Here it is:

 

if (! (Get-PackageProvider -name NuGet)) { Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force -Confirm:$false }

 

The provider 'nuget v2.8.5.208' is not installed.

nuget may be manually downloaded from https://cdn.oneget.org/providers/Microsoft.PackageManagement.NuGetProvider-2.8.5.208.dll and installed.

Would you like PackageManagement to automatically download and install 'nuget' now?

[Y] Yes  [N] No  [?] Help (default is "Y"):

 

--

John Wright

IT Support Specialist

1800 Old Bluegrass Avenue, Louisville, KY 40215

502.708.9953

Please submit IT requests to Hazelwoo...@bluegrass.org

24 Hour Helpline 1.800.928.8000

  

CONFIDENTIALITY NOTICE: This message contains confidential information and is intended only for the individual(s) addressed in the message. If you are not the named addressee, you should not disseminate, distribute, or copy this e-mail. If you are not the intended recipient, you are notified that disclosing, distributing, or copying this e-mail is strictly prohibited.

Michael B. Smith

unread,
Nov 3, 2025, 3:08:35 PMNov 3
to ntpowe...@googlegroups.com

Pretty sure you need to add one more argument:

 

if (! (Get-PackageProvider -name NuGet)) { Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force -Confirm:$false -ForceBootStrap }

 

Let me know.

Wright, John M

unread,
Nov 3, 2025, 3:18:51 PMNov 3
to ntpowe...@googlegroups.com

Unfortunately, it still prompts:

 

if (! (Get-PackageProvider -name NuGet)) { Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force -Confirm:$false -ForceBootStrap }

 

The provider 'nuget v2.8.5.208' is not installed.

nuget may be manually downloaded from https://cdn.oneget.org/providers/Microsoft.PackageManagement.NuGetProvider-2.8.5.208.dll and installed.

Would you like PackageManagement to automatically download and install 'nuget' now?

[Y] Yes  [N] No  [?] Help (default is "Y"):

 

--

John Wright

IT Support Specialist

1800 Old Bluegrass Avenue, Louisville, KY 40215

502.708.9953

Please submit IT requests to Hazelwoo...@bluegrass.org

24 Hour Helpline 1.800.928.8000

  

CONFIDENTIALITY NOTICE: This message contains confidential information and is intended only for the individual(s) addressed in the message. If you are not the named addressee, you should not disseminate, distribute, or copy this e-mail. If you are not the intended recipient, you are notified that disclosing, distributing, or copying this e-mail is strictly prohibited.

 

From: ntpowe...@googlegroups.com <ntpowe...@googlegroups.com> On Behalf Of Michael B. Smith
Sent: Monday, November 3, 2025 3:09 PM
To: ntpowe...@googlegroups.com
Subject: [ntpowershell] RE: Command fails on remote PC because of Nuget provider prompt

 

This is the first time you received an email from this sender (mic...@smithcons.com). Exercise caution when clicking links, opening attachments or taking further action, before validating its authenticity.

Secured by Check Point

 

Pretty sure you need to add one more argument:

 

if (! (Get-PackageProvider -name NuGet)) { Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force -Confirm:$false -ForceBootStrap }

 

Let me know.

--
You received this message because you are subscribed to the Google Groups "ntpowershell" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ntpowershell...@googlegroups.com.

Michael B. Smith

unread,
Nov 3, 2025, 3:24:05 PMNov 3
to ntpowe...@googlegroups.com

Is the script running with admin privs?

 

I just spun up a VM to test, but it’ll take 15-20 minutes to apply updates.

Wright, John M

unread,
Nov 3, 2025, 3:33:22 PMNov 3
to ntpowe...@googlegroups.com
Yes, it’s running as admin.


--
John Wright
IT Support Specialist 
1800 Old Bluegrass Avenue, Louisville, KY 40215
Please submit IT requests to Hazelwoo...@bluegrass.org
24 Hour Helpline 1.800.928.8000
Image
CONFIDENTIALITY NOTICE: This message contains confidential information and is intended only for the individual(s) addressed in the message. If you are not the named addressee, you should not disseminate, distribute, or copy this e-mail. If you are not the intended recipient, you are notified that disclosing, distributing, or copying this e-mail is strictly prohibited.

From: ntpowe...@googlegroups.com <ntpowe...@googlegroups.com> on behalf of Michael B. Smith <mic...@smithcons.com>
Sent: Monday, November 3, 2025 3:24:02 PM
To: ntpowe...@googlegroups.com <ntpowe...@googlegroups.com>

Subject: [ntpowershell] RE: Command fails on remote PC because of Nuget provider prompt
This is the first time you received an email from this sender (mic...@smithcons.com). Exercise caution when clicking links, opening attachments or taking further action, before validating its authenticity.
Secured by Check Point

Is the script running with admin privs?

 

I just spun up a VM to test, but it’ll take 15-20 minutes to apply updates.

 

--
You received this message because you are subscribed to the Google Groups "ntpowershell" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ntpowershell...@googlegroups.com.

Michael B. Smith

unread,
Nov 3, 2025, 4:45:48 PMNov 3
to ntpowe...@googlegroups.com

Stupid silly inconsistency. A Get-* cmdlet is NEVER supposed to modify system state.

 

This does the bootstrap:

 

               Get-PackageProvider -Name NuGet -Force -ForceBootstrap

Wright, John M

unread,
Nov 4, 2025, 8:51:17 AMNov 4
to ntpowe...@googlegroups.com

That was it!  Thanks very much for your help.  I would’ve been a long time figuring that one out.

 

--

John Wright

IT Support Specialist

1800 Old Bluegrass Avenue, Louisville, KY 40215

502.708.9953

Please submit IT requests to Hazelwoo...@bluegrass.org

24 Hour Helpline 1.800.928.8000

  

CONFIDENTIALITY NOTICE: This message contains confidential information and is intended only for the individual(s) addressed in the message. If you are not the named addressee, you should not disseminate, distribute, or copy this e-mail. If you are not the intended recipient, you are notified that disclosing, distributing, or copying this e-mail is strictly prohibited.

 

From: ntpowe...@googlegroups.com <ntpowe...@googlegroups.com> On Behalf Of Michael B. Smith
Sent: Monday, November 3, 2025 4:46 PM
To: ntpowe...@googlegroups.com
Subject: [ntpowershell] RE: Command fails on remote PC because of Nuget provider prompt

 

This is the first time you received an email from this sender (mic...@smithcons.com). Exercise caution when clicking links, opening attachments or taking further action, before validating its authenticity.

Secured by Check Point

 

Stupid silly inconsistency. A Get-* cmdlet is NEVER supposed to modify system state.

 

This does the bootstrap:

 

               Get-PackageProvider -Name NuGet -Force -ForceBootstrap

 

--
You received this message because you are subscribed to the Google Groups "ntpowershell" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ntpowershell...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages