Answer the question
In order to leave comments, you need to log in
How to repeat a block on error?
There is a script in PowerShell, it has an IF block, at the moment.
if the condition is true: asks for a password to connect to the SQL database and connects;
IF (условие) {
запрос пароля
try {подключение к базе}
catch {не удалось подключится
exit}
}
Answer the question
In order to leave comments, you need to log in
Function AskAndCheck
{
$ask = Read-Host 'Type 1'
if ($ask -ne 1)
{
Write-Host 'fault'
AskAndCheck}
}
AskAndCheck
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question