A curated collection of over 160 PowerShell functions. Many functions written by me. Others are attributed wherever possible.

Minimum PowerShell version


Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Module -Name PoshFunctions -RequiredVersion

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More


Bill Riedy


(c) 2021 Bill Riedy. All rights reserved.

Package Details



base64 beep binaryip calendar capslock color-hex color-rgb color-show computersite computer-site credential date-random datetime date-truncate days-week decimalip display dns-async dotteddecimalip email-address expand-string expand-tab exponentiation file file-encoding file-invalidchar folder format functions gui ini inputbox ip iprange isadmin isdate ishexstring isnumeric isvalidemail isvalidip library macaddress magic8ball markdown md5sum msgbox numlock ping-async popup progress random-date registry reverse-string rot13 round savefile scrolllock set-type share-permission share-stat shortcut sid speak subnetmask system timezone urlencode utc wrap-text xml


Compare-ObjectProperty Compare-PSGalleryObject Convert-HexToRGB Convert-ObjectToHashtable Convert-RGBToHex Convert-ROT13 Convert-SecureStringToString Convert-UserFlag ConvertFrom-Base64 ConvertFrom-Binary ConvertFrom-DateTime ConvertFrom-FsRight ConvertFrom-Hex ConvertFrom-UrlEncode ConvertFrom-UTC ConvertFrom-Xml ConvertTo-Base64 ConvertTo-Binary ConvertTo-BinaryIPv4 ConvertTo-Bool ConvertTo-DateTime ConvertTo-DecimalIPv4 ConvertTo-DottedDecimalIPv4 ConvertTo-Hex ConvertTo-OrderedDictionary ConvertTo-UncPath ConvertTo-UrlEncode ConvertTo-UTC Copy-Object Eexit Expand-IPv6 Expand-String Expand-Tab Export-CSVSortedColumn FileSizeAbove FileSizeBelow Format-MacAddress Format-RandomCase Format-ReverseString Format-SortedList Format-TitleCase Format-WrapText Get-Address Get-BashPath Get-BinaryType Get-ComputerSite Get-ComputerUptime Get-DiceRoll Get-DNSHostEntryAsync Get-DriveStat Get-Enum Get-ExecutableForFile Get-FileEncoding Get-FileName Get-FileWithLeadingSpace Get-Folder Get-Font Get-Fortune Get-GeoCode Get-InvalidFileCharacter Get-IpRange Get-LastDayInMonth Get-LongName Get-MachineType Get-MacVendor Get-Magic8Ball Get-Md5Sum Get-NetworkCredential Get-NTFSPermission Get-NtpDate Get-Power Get-PrintableAscii Get-PrivateProfileComment Get-PrivateProfileSection Get-PrivateProfileSectionNames Get-PrivateProfileString Get-PSWho Get-RandomDate Get-RandomHexDigit Get-RandomMacAddress Get-RegExpandString Get-RegistryValue Get-Round Get-SaveFile Get-Shortcut Get-ShortName Get-SID Get-SpecialFolder Get-StaticProperty Get-SubnetMaskIPv4 Get-TruncatedDate Get-Type Get-TypeAccelerator Get-UrlContent Get-WordCount Get-WordList grep Invoke-Beep Invoke-Speak Join-Object Lock-Workstation Measure-Char mklink Move-ToRecycleBin New-Credential New-InputBox New-Popup New-QR New-RandomPassword New-Screenshot New-Shortcut Out-PDFToPrinter Read-HostWithDefault Remove-BlankOrComment Remove-EmptyProperty Remove-QuotesFromCsv Remove-TeamsCache Remove-Trailing Reset-Desktop Resolve-FQDN Resolve-HostName sed Set-Capslock Set-Display Set-Numlock Set-PrivateProfileComment Set-PrivateProfileString Set-Scrolllock Set-Speaker Set-Type Set-WindowStyle Show-AllColor Show-Calendar Show-Color Show-ColorsWithBackground Show-DaysOfWeek Show-FileAttribute Show-FsRight Show-Month Show-NamedColor Show-Object Show-Progress Show-ShortDaysOfWeek Show-ShortMonth Show-SubnetMaskIPv4 Show-Timezone Start-ADReplication Start-RecordSession Stop-RecordSession Switch-Mute Test-ConnectionAsync Test-IsAdmin Test-IsCapsLock Test-IsDate Test-IsFileLocked Test-IsHexString Test-IsNull Test-IsNumeric Test-IsNumLock Test-IsScrollLock Test-IsValidEmailAddress Test-IsValidIPv4 Test-IsValidIPv6 Test-Network Test-NtpDateVsNow Test-Password Test-Port Union-Object Update-ExplorerIcon Write-StringArray Write-TextMenu


This module has no dependencies.

Release Notes

* updated PoshFunctions.psd1 to explicitly enumerate AliasesToExport
* tested all functions work properly in both PowerShell 5.1 and 7.1.2
* updated all *.ps* to pass Invoke-ScriptAnalyzer without throwing RuleViolation. The only one I could NOT fix is function Union-Object. If you wish this error to not affect you then I would suggest that when you import the module you include the -DisableNameChecking parameter
* updated scripts to attempt to explicit and fully name all parameters and all functions and parameters match the case as found in official Microsoft documentation
* made GitHub repository viewable to the public and updated PoshFunctions.psd1 to reflect the GitHub repository
* added Convert-HexToRGB - accepts HEX strings with or without # prefix, has -IncludeInput parameter
* added Convert-RGBToHex - can either accept RGB strings or explicitly specified -Red -Green -Blue parameters
* added ConvertFrom-Binary
* added ConvertFrom-Hex
* added ConvertTo-Binary
* added ConvertTo-Hex
* added Format-TitleCase - which will capitalize the first letter of each word in a string.
* added Get-Address - will get address given specified latitude and longitude coordinates. Requires active internet connection. External site is throttled so don't make too many calls in short period of time.
* added Get-GeoCode - will get latitude and longitude coordinates for specified address. Requires active internet connection. External site is throttled so don't make too many calls in short period of time.
* added Get-LastDayInMonth
* added Get-LongName - get the longname of a passed shortname (8.3) of a file/folder. Will expand relatively named files to explicitly defined files '.\test.txt' to 'c:\temp\test.txt'
* added Get-ShortName - get the shortname (8.3) of the passed file/folder. Will expand relatively named files to explicitly defined files '.\test.txt' to 'c:\temp\test.txt'
* added New-RandomPassword - can specify minimum and maximum password lengths, whether to avoid similar characters or limit the alphabetic characters to short English words
* added Out-PrinterPDF - prints specified PDF files to the current default printer
* added Test-Network - wrapper for Get-IpRange, Test-ConnectionAsync, and Get-DNSHostEntryAsync to give summary table of ip addresses that either resolve to a host name or respond to a ping
* added Test-Password - can either check against local computer or domain. can pass either credential or username / password (as securestring)
* removed Convert-ARGBToHex
* removed Convert-HexToARGB
* removed ConvertTo-Markdown
* removed ConvertTo-PlainText
* removed ConvertTo-SecureText
* removed Get-OperatingSystemSKU
* removed Get-PoshFunctionsPrivateData
* removed Get-Share
* removed Get-SharePermission
* removed Get-ShareStat
* removed Help
* removed Remove-BOMFromFile
* removed Remove-InvalidFileNameChar
* removed Search-Method
* renamed Get-InvalidFileCharacter from Show-InvalidFileCharacter - added -IncludeValues where decimal and hexadecimal values are included in output, added -Printable where only printable characters (> 32) are in the output, added examples, added alias for function 'Show-InvalidFileCharacter', changed datatype of 'Char' from [char] to [string]
* renamed Get-SpecialFolder from Show-SpecialFolder - reworked Show-SpecialFolder, added -Name parameter with ValidateSet against it for valid SpecialFolder names and if not specified returns all SpecialFolders, added -IncludeInput to be consistent with other functions, aliased function to 'Show-SpecialFolder' for backward compatibility
* renamed Get-TypeAccelerator from Show-TypeAccelerator - added -MatchString string parameter to show only those that match, here string entries for some type accelerators that don't show up automatically, added $split delimiter depending on Powershell major version number
* renamed Get-ComputerUptime from Get-LastReboot - made function more closely mimic Get-Uptime from PowerShell 6 and 7, aliased to Get-LastReboot
* udpated Set-Type - added begin, process, end blocks, updated logic to properly accept input from pipeline and to be handled by both pwsh and Powershell
* updated Compare-ObjectProperty - updated comment help to give better .EXAMPLE
* updated Convert-ARGBToHex - changed -IncludeOriginal to -IncludeInput to be consistent
* updated Convert-ROT13 - added -IncludeInput parameter, added examples
* updated Convert-UserFlag - changed -UserFlag to [int[]], added -IncludeInput to be consistent
* updated ConvertFrom-Base64 - added -IncludeInput
* updated ConvertFrom-DateTime - changed -DateTime parameter to -Date to be more PowerShell-y
* updated ConvertFrom-UTC - added -IncludeInput
* updated ConvertFrom-UrlEncode - changed -IncludeOriginal to -IncludeInput to be consistent aliased to 'IncludeOriginal', fixed minor logic error
* updated ConvertTo-Base64 - added -IncludeInput
* updated ConvertTo-BinaryIPv4 - changed -IncludeOriginal to -IncludeInput to be consistent
* updated ConvertTo-Bool - changed -IncludeOriginal to -IncludeInput to be consistent
* updated ConvertTo-DateTime - changed -IncludeOriginal to -IncludeInput for consistency, aliased to 'IncludeOriginal'
* updated ConvertTo-DecimalIPv4 - added code to handle multiple addresses to be converted, added -IncludeInput, added example
* updated ConvertTo-DottedDecimalIPv4 - added code to handle multiple addresses to be converted, added -IncludeInput, added example
* updated ConvertTo-UncPath - added -IncludeInput, additional example
* updated ConvertTo-UrlEncode - changed -IncludeOriginal to -IncludeInput to be consistent and aliased to 'IncludeOriginal'
* updated Expand-IPv6 - added code to handle multiple addresses to be expanded, added -IncludeInput
* updated Expand-String - changed -IncludeOriginal to -IncludeInput to be consistent aliased to 'IncludeOriginal', added to comment help
* updated Format-MacAddress - change $prop from [hashtable] to ([ordered] [hashtable]) so behavior is consistent between PowerShell.exe and pwsh.exe
* updated Format-RandomCase - added -IncludeInput, renamed some variables inside of function, added example
* updated Get-BashPath - added example in comment help, changed New-Object parameter to match form "-Propery ([ordered] @{...})" so that output matches between PowerShell and pwsh, changed -IncludeOriginal to -IncludeInput to be consistent
* updated Get-ComputerSite - change -IncludeComputerName to -IncludeInput to be consistent
* updated Get-Enum - changed -IncludeType to -IncludeInput aliased to 'IncludeType' fixed minor logic error
* updated Get-Filename - added begin, process, end blocks, added Write-Verbose
* updated Get-Folder - added begin, process, end blocks, added Write-Verbose
* updated Get-Font - added begin, process, end blocks. tightened up code in process block and slightly changed internal variable name
* updated Get-Fortune - added Wisdom.txt to module and default -Path to this file
* updated Get-IpRange - changed -Subnets to -Subnet to conform to Powershell standards, aliased to 'Subnets'
* updated Get-MacVendor - added write-verbose, updated comment help, removed redundant portion of regex
* updated Get-MachineType - added example, changed -ComputerName to [string[]] and added code to handle multiple
* updated Get-Md5Sum - changed -IncludeFile to -IncludeInput to be consistent and aliased to 'IncludeFile', changed -File to -Path to be more Powershell-y and aliased to 'File', 'FileName'
* updated Get-NTFSPermission - changed $Path from [string] to [string[]] and function can now handle multiple paths
* updated Get-Power - added -IncludeInput
* updated Get-RandomDate - added some examples in comment help, -IncludeInput parameter
* updated Get-RandomHexDigit - added begin, process, end blocks, updated comment help
* updated Get-SID - changed -IncludeOriginal to -IncludeInput to be consistent and aliased to 'IncludeOriginal'
* updated Get-SaveFile - changed -InitialDirectory to -Path and aliased to 'InitialDirectory'
* updated Get-SubnetMaskIPv4 - changed -NetworkLength to -Length and aliased to old name, changed -IncludeCIDR to -IncludeInput to be more consistent, changed field name with -IncludeInput
* updated Get-TruncatedDate - changed -IncludeOriginal to -IncludeInput and aliased to 'IncludeOriginal'
* updated Get-Type - added begin, process, end blocks and write-verbose
* updated Get-WordCount - updated comment help to more accurately reflect function
* updated New-InputBox - added write-verbose statements
* updated New-Popup - added example in help
* updated New-Screenshot - added begin, process, end blocks, added write-verbose
* updated New-Shortcut - fixed logic errors that prevented proper functioning
* updated Resolve-FQDN - added -IncludeInput, changed -ComputerName to [string[]]
* updated Resolve-HostName - changed -HostName to [string[]], added -IncludeInput, added example
* updated Set-Display - corrected example in comment help, corrected example works flawlessly
* updated Show-FileAttribute - added examples
* updated Test-IsDate - changed New-Object parameter to match form "-Propery ([ordered] @{...})" so that output matches between PowerShell and pwsh
* updated Test-IsHexString - added .PARAMETER statements to comment help
* updated Test-IsNumeric - changed New-Object parameter to match form "-Propery ([ordered] @{...})" so that output matches between PowerShell and pwsh
* updated Test-NTPDateVsNow - added -IncludeInput parameter, -ComputerName no longer mandatory and if left blank uses Get-ADDomainController to determine name of DC, added example
* updated sed - added process blocks and Write-Verbose


Version History

Version Downloads Last updated
2.2.9 1,614 9/30/2022
2.2.8 1,359 2/25/2022
2.2.7 232 11/17/2021
2.2.6 212 8/2/2021
2.2.5 9 8/2/2021
2.2.4 46 6/30/2021
2.2.3 32 6/3/2021 (current version) 169 3/23/2021 62 2/15/2021 27 2/8/2021 61 12/17/2020 78 10/27/2020 17 10/12/2020 11 10/12/2020
Show less