2

I have a script to undeploy my solution and I want to simply add a confirmation message. I found hundrets of blog entries, how to remove a confirmation via -confirm:$false parameter, but I find the opposite.

Something like this:

Write-Host "Are you shure that you want to remove the given solution (this can't be undone)?"

if (confirm() ) {
    Uninstall-SPSolution -Identity $wspIdentitySTR -confirm:$false
    .
    .
    .   
}

1 Answer 1

3

Pulled from some really old PS1 code

Doesn't this work anymore?

$ServerName = Read-Host -Prompt 'What is the server name?'
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.