Hi,I am very new to writing in powershell, so bear with me.My aim is to get a list of certificates and prompt the user to select which certificate they require. In my head I want the output0 Cert11 Cert23 Cert3Select your cert 0, 1, 2This is where I have got to from internet research. Appreciate any help.[code="plain"]$caption = “Select the certificate you require” $message = “Select the desire certificate” $choices = [System.Management.Automation.Host.ChoiceDescription[]] ` @(Get-ChildItem -path cert:\LocalMachine\My) [int]$defaultChoice = 0 $choiceRTN = $host.ui.PromptForChoice($caption,$message, $choices,$defaultChoice) [/code]
↧