Skip to content

Instantly share code, notes, and snippets.

View tinuwalther's full-sized avatar

Martin Walther tinuwalther

View GitHub Profile
tinuwalther / Write-MyLoginformation.ps1
Last active June 15, 2022 07:51
Write Loginformation to a logfile in markdown and the screen.
function Write-IXLoginformation {
Write Loginformation
Write Loginformation to a logfile and, or screen. The default logfile-size is 4mb, to change this use the switch MaxLogFileSizeMB
.PARAMETER InputObject
Specify the input-object.
tinuwalther / kms-settings.ps1
Last active August 29, 2022 07:31
KMS Setting
Check KMS Settings
1. Get License Information from Windows Software Licensing Management Tool (slmgr.vbs)
2. Get KMS Information from DNS (nslookup -type=srv _vlmcs._tcp)
3. Get License Information from local Registry Software Protection Platform
4. Check connectivity to KMS Server and the port from the local Registry
5. Check connectivity to KMS Server and the port from the slmgr.vbs
# Disable Citrix Workspace AutoStart
if((id -u) -eq 0){
) | ForEach-Object {
$citrixitem = Get-ChildItem $_ | Where-Object Name -match citrix
Write-Host ($citrixitem | Select-Object Name, FullName | Out-String)
$citrixitem | ForEach-Object {
Rename-Item -Path $($_.FullName) -NewName $($_.FullName -replace '.plist', '.bak') -PassThru
tinuwalther / New-vCenterDiagram.ps1
Last active November 17, 2022 17:33
New-vCenterDiagram - Create a Mermaid Class Diagram.
.PARAMETER InputObject
Specify a valid InputObject.
function Test-IsCurrentUserAdmin{
if((id -u) -eq 0){
return $true
return $false
$current = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())

Authentifzierung in PowerShell

Downlevel Protokolle

  • WMI -> DCOM, RPC
    Get-WMIObject / Invoke-WMIMethod -ConputerName -Credential -Authoritoy (NTLM/Kerbersos, Realm) -Impersonation (Anonymus,Identify, Impersonate, Delegate)
  • WMIClass [WMISearcher]
  • PSDrive
    New-PSDrive -ComputerName -Credential
  • Acrive Directory, MSSQL
    Server, Credential
tinuwalther / Demo.ps1
Last active May 6, 2023 10:26
Tests for
# Create a file with 50'000 lines