Skip to content

Latest commit

History

142 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

PSTools (still in progress)

PSTool is a PowerShell module with some useful PowerShell functions, espescially for System Engineers and System Administrators. The module contains mainly functions for Windows Environments, but feel free to add functions for Linux environments. Not all functions were written by me. This repo merely a collection of useful functions.

Please be carefull and test the functions before you use it in your production environments. I am very appreciative for any help, extension or comments.

Functions & Features

PowerShell functionDescription
Clear-RecycleBinEmpty the recycle bin.
Convert-UnixTimestampThis function converts a Unix Timestamp (Epoche Time) in a readable date format.
ConvertFrom-Base64Converts/Decode a Base64 file.
ConvertTo-Base64Converts/Encode a file to Base64.
Disable-TelemetryOnWin10Disable Windows 10 Telemetry Services/Tasks.
Export-EventLogExport traditional Windows Eventlogs.
Get-CPUNumberGet the number of CPU's, Cores, logical Processors.
Get-DirectoryStatsList directories and size in the current path.
Get-DuplicatedIPAddressGet the last duplicated IP-Address.
Get-FileEncodingGet file encoding.
Get-FileLockProcessCheck which process is locking a file.
Get-FileMetaDataSmall function that gets metadata information from file.
Get-FreeDiskSpaceGet free disk space of all disk volumes with an driveletter on a remote system.
Get-HBAInfoGet information about the installed HBA card.
Get-InfluxDB2DataGet data from an InfluxDB 2.x.
Get-InstalledSoftwareGet all installed from the Uninstall keys in the registry.
Get-LiveMigrationBlackoutTimeGet the BlackoutTime of each LiveMigration.
Get-MountPointsAndUserDisksGet all mountpoints and all UserProfileDisks (Roaming Profiles as a VHDX).
Get-MSIDatabaseInfoGet infos (mandatory properties) from the database of an MSI-file.
Get-NetStatGet information about TCP & UDP connections.
Get-NetworkAdapterConnectionStatusGet NIC status with more details then in the built-in windows command.
Get-OSVersionGet the detailed Windows Version with current support channel and updatelevel.
Get-PendingRebootGets the pending reboot status on a local or remote computer.
Get-PowerPlanGet Windows PowerPlans.
Get-SumOfAllFilesDisk Space Usage of all Files between a specified time period.
Get-UpTimeOutputs the last bootup time and uptime for one or more computers.
Get-VMHealthStateGet the VMHealthStates (Heartbeat) of all VMs in a Cluster.
Get-vNetworkTrafficCIMShows the Traffic of the vNICs of the VMs on a Hyper-V Node.
Get-WindowsProxyConfigGet information about Windows Proxy configurations.
Get-WindowsUpdateInfoFromWSUSGet information about Windows Updates from WSUS.
New-ISOFileThe New-IsoFile cmdlet creates a new .iso file containing content from chosen folders.
Remove-WindowsUpdateFromWSUSRemove a Windows Update from WSUS.
Search-IPsInSubnetSearch/Scan a subnet.
Set-DNSPTRRecordSets the PTR-Record on Microsoft DNS Server.
Set-PageFileSizeConfigure the PageFile location/drive, initialsize and maximumsize.
Set-PowerPlanSet Windows PowerPlans locally or remotely.
Set-ProxyWinINETThis function will set the proxy settings provided as input to the cmdlet.
Show-ColorTableShows all Windows console colors.
Start-LoopClusterNodeDrainingThis function is for massive LiveMigration tests (drain on nodes in Cluster).
Start-LoopClusterVMMoveThis function is for massive LiveMigration tests (move a single vm).
Start-LoopVMMHyperVMaintenanceThis function is for massive LiveMigration tests (start maintenance from VMM).
Test-NetConnectionLoopTest connection in a loop.
Test-PortTests port on computer.
Test-WebServerSSLCertGet SSL certification of a web URL.
Write-JsonToRegistryWrite a JSON-Object (tree) to Registry.

About

A PowerShell module with some useful functions

Topics

Resources

Stars

19 stars

Watchers

2 watching

Forks

Contributors

Languages