/sysinternals

PowerShell Crescendo module for SysInternals tools.

Primary LanguagePowerShellMIT LicenseMIT

SysInternals

PowerShell Crescendo module for SysInternals tools.

Installation

This module does not include the commands that it wraps. You can install them with scoop or Chocolatey.

Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh')
scoop bucket add extras
scoop install sysinternals
choco install sysinternals

To install this module:

Install-Module SysInternals

Commands

Get-LogonSession (logonsessions.exe)

Get-LogonSession [<CommonParameters>]

Find-Handle (handle.exe)

Find-Handle [[-Name] <string>] [[-Process] <string>] [<CommonParameters>]

Show-ClockResolution (clockres.exe)

Show-ClockResolution [<CommonParameters>]

Show-CoreInfo (coreinfo.exe)

Show-CoreInfo [-Cores] [-Features] [-Groups] [-Caches] [-NumaNodes] [-Sockets] [-NumaAccessCost] [-Virtualization] [<CommonParameters>]

Show-Dll (listdlls.exe)

Show-Dll [[-Name] <string>] [[-Process] <string>] [<CommonParameters>]

Show-LoggedOnAccount (psloggedon.exe)

Show-LoggedOnAccount [[-ComputerName] <string>] [[-User] <string>] [-Local] [-NoLogonTimes] [<CommonParameters>]

Show-NamedPipe (pipelist.exe)

Show-NamedPipe [<CommonParameters>]

Start-PsExec (psexec.exe)

Start-PsExec [[-ComputerName] <string>] [[-Command] <string>] [[-Arguments] <string>] [-System] [<CommonParameters>]

Sync-Disk (sync.exe)

Sync-Disk [[-Drive] <string>] [-FlushRemovableDrive] [-EjectRemovableDrive] [<CommonParameters>]

Contributing

Commands are defined in the src directory. Each command should be in a PS1 file with the same name as the SysInternal tool. Commands are defined by hashtables that match the Crescendo JSON format.

For example, the Get-LogonSession cmdlet is defined using this hashtable.

@{
    Verb                    = 'Get'
    Noun                    = 'LogonSession'
    OriginalName            = 'logonsession.exe'
    OriginalCommandElements = @("--nobanner", "--acceptlogo", "-c")
    OutputHandlers          = @(
        @{
            ParameterSetName = 'Default'
            HandlerType      = 'Inline'
            Handler          = '$args[0] | ConvertFrom-Csv'
        }
    )
}

To build and test the module, run build.ps1. Please note you will need Powershell 7 to run the build.ps1