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
function Write-IXLoginformation { | |
<# | |
.SYNOPSIS | |
Write Loginformation | |
.DESCRIPTION | |
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. |
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
<# | |
.SYNOPSIS | |
Check KMS Settings | |
.DESCRIPTION | |
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 |
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
# Disable Citrix Workspace AutoStart | |
if((id -u) -eq 0){ | |
@( | |
'/Library/LaunchAgents' | |
'/Library/LaunchDaemons' | |
) | 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 |
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
<# | |
.SYNOPSIS | |
New-vCenterDiagram.ps1 | |
.DESCRIPTION | |
New-vCenterDiagram - Create a Mermaid Class Diagram. | |
.PARAMETER InputObject | |
Specify a valid InputObject. | |
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
function Test-IsCurrentUserAdmin{ | |
if($IsLinux){ | |
if((id -u) -eq 0){ | |
return $true | |
}else{ | |
return $false | |
} | |
} | |
if($IsWindows){ | |
$current = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent()) |
- 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
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
<# | |
Tests for https://hcritter.devdojo.com/powershell-performance-test-file-reading | |
#> | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory=$false)] | |
[Switch]$Measure | |
) | |
# Create a file with 50'000 lines |