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
    .
    .
    .   
}
3

Pulled from some really old PS1 code

Doesn't this work anymore?

$ServerName = Read-Host -Prompt 'What is the server name?'
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.