Skip to content

Instantly share code, notes, and snippets.

View JeffMill's full-sized avatar

Jeff Miller JeffMill

  • Microsoft
  • Redmond, WA
View GitHub Profile
@JeffMill
JeffMill / List-Shared-SvcHost.ps1
Last active May 31, 2024 20:45
List all services in a shared svchost
tasklist.exe /svc /fo csv `
| Select-String -Pattern '"(?<ImageName>.*)","(?<PID>\d*)","(?<Services>.*)"' `
| ForEach-Object -MemberName Matches `
| Select-Object `
@{Name='Image Name'; Expression={$_.Groups['ImageName'].Value}}, `
@{Name='PID'; Expression={[int]$_.Groups['PID'].Value}}, `
@{Name='Services';Expression={$_.Groups['Services'].Value}} `
| Where-Object {$_.'Services' -ne 'N/A' } `
| Format-List
@JeffMill
JeffMill / Get-Signatures.ps1
Created July 26, 2023 20:15
Enumerate EXE and DLL signatures, returning Issuer and Subject.
# .\Get-Signatures.ps1 | Export-Csv -Path output.csv -NoTypeInformation
function Split-X500 {
Param([string]$X500)
$dict = @{}
$X500 -split ', ' | ForEach-Object {
$item = $_.Split('=')
$dict[$item[0]] = $item[1]
}
@JeffMill
JeffMill / WordAutomation-Threaded.ps1
Created May 10, 2021 17:06
Automate word (threaded)
$ScriptBlock =
{
Param([int]$RunNumber)
$filename = Join-Path ([IO.Path]::GetTempPath()) "powershell-$RunNumber.doc"
'Opening Word ...'
$oWord = New-Object -Com Word.Application
$oWord.Visible = $true
@JeffMill
JeffMill / cloudSettings
Last active July 13, 2017 18:06
Visual Studio Code Settings Sync Gist
{"lastUpload":"2017-07-13T18:06:50.116Z","extensionVersion":"v2.8.2"}