Powershell
einfach mal eine Sammlung von Codebespielen
Quick And Dirty
function OutputError([string]$errorMessage){Write-Host $errorMessage -ForegroundColor Red} $err ...
NT-Accounts
Write-Host "Create NT-Accounts" $admin = @("ACCOUNTNAME")$serviceAccounts = @("SERVICENAME") $P...
Choice1
function OutputError([string]$errorMessage){Write-Host $errorMessage -ForegroundColor RedRe...
Choice 2
param([String] $userName,[String] $passWord) $title = 'something'$question = 'Are you sure you w...
InputSample
param([Parameter(Mandatory=$true, Position=0)] [String] $userName,[Parameter(Mandatory=$true, Pos...
Folder
#Erstellt Unterordner im aktuellen Verzeichnisparam([String] $folderName)$exitCode = ":q" if ( -...
WARNUNG: Es kann kein Download von URI
Lösung Eine funktionierende Internetverbindung vorausgesetzt, liegt es vermutlich an dem „Upgrad...