phillipfromoz
Contributor
Contributor

Powershell CLI Set-PowerCLIConfiguration suppress confirmation

Jump to solution

Hi,

When I log into my vcenter:

Connect-VIServer -Server myvcenter.com -Credential $credential

I get this message:

WARNING: Please consider joining the VMware Customer Experience Improvement Program, so you can help us make PowerCLI

.....

To suppress this:

Set-PowerCLIConfiguration -Scope User -ParticipateInCEIP $false

However I get this confirmation:

Perform operation?

Performing operation 'Update PowerCLI configuration.'?

[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"):

How do I suppress this confirmation?

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership

Try adding -Confirm:$false


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
6 Replies
LucD
Leadership
Leadership

Try adding -Confirm:$false


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
phillipfromoz
Contributor
Contributor

Thanks. Works great!

0 Kudos
aa2017
Contributor
Contributor

I am having the same issue but I added the -Confirm:$false after the password. It still prompts me. Where should I add the -Confirm:$false statement?

0 Kudos
LucD
Leadership
Leadership

The Connect-VIServer cmdlet doesn't have the Confirm switch.

This thread was to add the Confirm switch on the Set-PowerCLIConfiguration cmdlet.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
aa2017
Contributor
Contributor

Hi LucD

You are saying add the confirm switch after the Connect-VIserver

Connect-VIServer -Server myvcenter.com -Credential $credential (Here?)

0 Kudos
LucD
Leadership
Leadership

No, I said the Connect-VIServer cmdlet does not have a Confirm parameter.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos