Skip to content

Instantly share code, notes, and snippets.

View pspete's full-sized avatar

Pete Maan pspete

View GitHub Profile
@pspete
pspete / Get-PlatformConnectionComponent.ps1
Last active October 5, 2023 21:27
Using the psPAS module - Get all connection components for a platform in CyberArk PAS.
Get-PASPlatform | # Get all platforms
Where-Object { $PSItem.PlatformId -eq 'WinDomain' } | # Filter specific platform
Select-Object -ExpandProperty Details | # Get the platform details
Get-PASPlatformPSMConfig | # Get the PSM Config for the Platform
Select-Object -ExpandProperty PSMConnectors # Output the connectors
@pspete
pspete / Resume-CPMManagement.ps1
Last active May 31, 2022 15:32
Deletes "CPMStatus","RetriesCount","CPMDisabled" & "LastTask" FileCategories.
$VaultIP = "192.168.70.10"
$VaultUser = "SomeUser"
$VaultPW = Read-Host -AsSecureString -Prompt "Password for User $VaultUser`:"
$SafeName = "SomeSafe"
$FileCategories = @("CPMStatus","RetriesCount","CPMDisabled","LastTask")
#Install PoShPACLI
Install-Module PoShPACLI -Scope CurrentUser
#Import PoShPACLI
@pspete
pspete / get-jape.ps1
Created October 20, 2015 10:46
PowerShell JAPE
(([char[]][int[]]((87..65) | ?{$_ -notmatch '66|67|68|70|71|75|77|81' }
)[10,2,4,3,1,-1,-7,-8,-12,-3,-2,-10,1,6,7,0,-2,5,4,12,13,9,9,1,-2,-7,
-12,-3,-13,-11,-4,-1,-11,-12] -join''
) -replace [char](90177536/1mb),[char](1kb/32)) -replace '$',','