lehrgaenge:windows_server_2008_r2:profile.ps1
Inhalt einer Konfigurationsdatei für die PowerShell
$Host.UI.RawUI.WindowTitle = "Hallo $env:Username "+"heute ist der "+(Get-Date -Format "%d.%M.%y")
function BinIchAdmin
{
$ident = [Security.Principal.WindowsIdentity]::getCurrent()
$principal = new-object Security.Principal.WindowsPrincipal($ident)
$IsAdmin = $principal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)
switch ($IsAdmin)
{
$Falce {write-host "Hallo Nutzer!"}
$True {write-host "Hallo Gott!"}
}
}
Start-Transcript -Append -Path ("$env:USERPROFILE\documents\"+(((Get-Date).DayOfWeek).tostring())+".txt")
lehrgaenge/windows_server_2008_r2/profile.ps1.txt · Zuletzt geändert: von 127.0.0.1
