Last active
April 8, 2021 13:14
-
-
Save numbnet/452d35065b0778bcf6954381095bb9c1 to your computer and use it in GitHub Desktop.
Net core app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rename-Computer -NewName NN -Force | |
Restart-Computer -ComputerName NN -Confirm -Force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Invoke-RestMethod -OutFile dotnet-install.ps1 ` | |
-Uri https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.ps1 | |
.\dotnet-install.ps1 -install | |
.\dotnet-install.ps1 -start | |
echo | |
############ | |
Invoke-RestMethod -OutFile bitwarden.ps1 ` | |
-Uri https://raw.githubusercontent.com/bitwarden/server/master/scripts/bitwarden.ps1 | |
.\bitwarden.ps1 -install | |
.\bitwarden.ps1 -start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
. .\try_execute_function.ps1 | |
write-host "Попытка выполнить внешнюю функцию." | |
write-host "Пожалуйста, введите значение, которое вы хотите узнать:" | |
write-host "1. Результат выполнения функции" | |
write-host "2. Дату время и погоду" | |
write-host "3. Дату и время" | |
$ex=read-host | |
if ($ex -eq "1" -or $ex -eq "2" -or $ex -eq "3") { | |
write-host "Выполняю функцию:" | |
} | |
elseif ([string]::IsNullOrEmpty($ex)) { | |
write-host "Вы указали неверный параметр." | |
break; | |
} | |
switch ($ex){ | |
"1"{ | |
Execute-Function | |
} | |
"2"{ | |
Get-DateOne | |
} | |
"3"{ | |
Get-DateTwo | |
} | |
Default | |
{ | |
write-host "Такой функции не существует." | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment