PoshFunctions

2.2.9

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

Minimum PowerShell version

5.0

Installation Options

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

Install-Module -Name PoshFunctions -RequiredVersion 2.2.9

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

Install-PSResource -Name PoshFunctions -Version 2.2.9

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

Owners

Copyright

(c) 2022 Bill Riedy. All rights reserved.

Package Details

Author(s)

  • Bill Riedy

Tags

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

Functions

Compare-ObjectProperty Compare-ObjectSetComplement Compare-ObjectSetDifference Compare-ObjectSetIntersection Compare-ObjectSetUnion Compare-PSGalleryObject Convert-HexToRGB Convert-Int32ToUint32 Convert-Int64ToText Convert-ObjectToHashtable Convert-RGBToHex Convert-SecureStringToString Convert-UserFlag ConvertFrom-Base64 ConvertFrom-Binary ConvertFrom-DateTime ConvertFrom-FsRight ConvertFrom-Hex ConvertFrom-HexString ConvertFrom-HtmlEncode ConvertFrom-RomanNumeral ConvertFrom-UrlEncode ConvertFrom-UTC ConvertFrom-Xml ConvertTo-Base64 ConvertTo-Binary ConvertTo-BinaryIPv4 ConvertTo-Bool ConvertTo-DateTime ConvertTo-DecimalIPv4 ConvertTo-DottedDecimalIPv4 ConvertTo-Hex ConvertTo-HexString ConvertTo-HtmlEncode ConvertTo-OrderedDictionary ConvertTo-RomanNumeral ConvertTo-UncPath ConvertTo-UrlEncode ConvertTo-UTC Copy-Object Eexit Expand-IPv6 Expand-String Expand-Tab Export-CSVSortedColumn Export-FontSample FileSizeAbove FileSizeBelow Format-MacAddress Format-RandomCase Format-ReverseString Format-ReverseToken Format-SortedList Format-TitleCase Format-WrapText Get-ArpTable Get-Assoc Get-BashPath Get-BinaryType Get-CeasarCipher Get-ComputerSite Get-ComputerUptime Get-DiceRoll Get-DisplayBrightness Get-DNSHostEntryAsync Get-DriveStat Get-DuplicateFileName Get-Enum Get-ErrorInfo Get-ExecutableForFile Get-Factorial Get-FileEncoding Get-FileName Get-FileWithLeadingSpace Get-FolderName Get-Font Get-Fortune Get-Ftype Get-InvalidFileCharacter Get-IpRange Get-LastDayInMonth Get-List Get-LongName Get-MachineType Get-MacVendor Get-Magic8Ball Get-Md5Sum Get-MyLocalLogonTime Get-NetworkCredential Get-NTFSPermission Get-NtpDate Get-Power Get-PrintableAscii Get-PrivateProfileComment Get-PrivateProfileSection Get-PrivateProfileSectionNames Get-PrivateProfileString Get-ProcessUser Get-PSWho Get-RandomDate Get-RandomHexDigit Get-RandomMacAddress Get-RegExpandString Get-RegistryValue Get-RelativePath Get-Round Get-SaveFileName Get-ScheduledTaskUser Get-ServiceUser Get-Shortcut Get-ShortName Get-SID Get-SpecialFolder Get-SqlDatabase Get-SqlIndexFragmentation Get-SqlStoredProcedure Get-StaticProperty Get-String Get-SubnetMaskIPv4 Get-TruncatedDate Get-Type Get-TypeAccelerator Get-UrlContent Get-VssAdminListVolumes Get-VssAdminListWriters Get-WordCount Get-WordList grep Invoke-Beep Invoke-CountdownTimer Invoke-SoundPlayer Invoke-Speak Join-Object Lock-Workstation Measure-Char Merge-Object mklink Move-ToRecycleBin New-ColorPicker New-Credential New-DatePicker New-FontPicker New-InputBox New-InputBoxSecureString New-MessageBox New-PFDateFormat New-QR New-RandomPassword New-Screenshot New-Shortcut Optimize-SqlIndexFragmentation Optimize-SqlStoredProcedure 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-SpeakerVolume 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 Split-CanonicalName Split-DistinguishedName Split-Line Start-ADReplication Start-RecordSession Stop-RecordSession Switch-Mute Test-ConnectionAsync Test-IsAdmin Test-IsCapsLock Test-IsDate Test-IsFileLocked Test-IsHexString Test-IsLocalIPv4 Test-IsNull Test-IsNumeric Test-IsNumLock Test-IsScrollLock Test-IsValidEmailAddress Test-IsValidIPv4 Test-IsValidIPv6 Test-MultipleBool Test-Network Test-NtpDateVsNow Test-Password Test-PasswordComplexity Test-Port Test-Set Update-ExplorerIcon Use-Stopwatch Write-SelectStatement Write-StringArray Write-StringHash Write-TextMenu

Dependencies

This module has no dependencies.

Release Notes

For full release notes see .\Resources\ReleaseNotes.txt
### 2.2.9
* added ConvertFrom-HexString - converting a hex string back to plain text: '41' -> 'A'
* added ConvertTo-HexString = converting plain text to a hex string: 'A' -> '41'
* added Get-ErrorInfo - explain please
* added Get-Factorial - calculates the factorial of a number 1-20. Higher than 20 results in overflow of [int64] datatype
* added Invoke-SoundPlayer - will play a .wav file
* added Split-CanonicalName - splits an AD canonical name into either -Parent or -Leaf
* added Split-DistinguishedName - splits an AD distinguished name into either -Parent or -Leaf
* added Write-SelectStatement - helper function to write a select statement for properties and converts properties that are arrays to a delimited string. Helpful when exporting complex object to CSV
* updated Compare-ObjectProperty - replaced += with [System.Collections.Arraylist]
* updated Convert-Int32ToUint32 - replaced += with [System.Collections.Arraylist]
* updated Convert-Int64ToText - fixed trailing space with .Trim()
* updated ConvertFrom-FsRight - removed $MatchFound | Out-Null, replaced += with [System.Collections.Arraylist], fixed logic error with Combo rights and IncludeInput
* updated Copy-Object - replaced += with [System.Collections.Arraylist]
* updated Expand-IPv6 - replaced += with [System.Collections.Arraylist]
* updated Export-FontSample - replaced += with [System.Collections.Arraylist]
* updated Format-RandomCase - replaced += with [System.Collections.Arraylist]
* updated Format-WrapText - replaced += with [System.Collections.Arraylist]
* updated Get-CeasarCipher - replaced += with [System.Collections.Arraylist]
* updated Get-ComputerUptime - added Credential
* updated Get-DisplayBrightness - added Credential, fixed error if not running on laptop monitor
* updated Get-Enum - replaced += with [System.Collections.Arraylist]
* updated Get-Font - minor logic fix in Where-Object statement that previously returned no results
* updated Get-IpRange - replaced += with [System.Collections.Arraylist]
* updated Get-MachineType - added Credential
* updated Get-MacVendor - replaced Invoke-RestMethod with curl.exe as it was no longer returning correct results
* updated Get-NTFSPermission - replaced += with [System.Collections.Arraylist]
* updated Get-NtpDate - replace piping to Out-Null to $null =
* updated Get-PSWho - added Credential
* updated Get-PrintableAscii - updated logic to replace ' ' with '(Space)'
* updated Get-PrivateProfileString - replace piping to Out-Null to $null =
* updated Get-ProcessUser - added Credential
* updated Get-ScheduledTaskUser - replaced += with [System.Collections.Arraylist], added Credential
* updated Get-ServiceUser - replaced += with [System.Collections.Arraylist], added Credential
* updated Get-SqlDatabase - replaced += with [System.Collections.Arraylist]
* updated Get-SqlStoredProcedure - replaced += with [System.Collections.Arraylist]
* updated Get-Type - replaced += with [System.Collections.Arraylist]
* updated Get-TypeAccelerator - replaced += with [System.Collections.Arraylist]
* updated Invoke-Speak - replaced += with [System.Collections.Arraylist]
* updated Measure-Char - replaced += with [System.Collections.Arraylist]
* updated Merge-Object - replaced += with [System.Collections.Arraylist]
* updated New-Shortcut - replace piping to Out-Null to $null =
* updated Optimize-SQLIndexFragmentation - replace piping to Out-Null to $null =
* updated Optimize-SQLStoredProcedure - replace piping to Out-Null to $null =
* updated Set-Display - added Credential
* updated Set-PrivateProfileComment - replaced += with [System.Collections.Arraylist]
* updated Set-WindowStyle - replace piping to Out-Null to $null =
* updated Show-Calendar - replaced += with [System.Collections.Arraylist]
* updated Show-FsRight - replaced += with [System.Collections.Arraylist]
* updated Show-NamedColor - replaced += with [System.Collections.Arraylist]
* updated Show-Object - replaced += with [System.Collections.Arraylist]
* updated Show-Progress - replaced += with [System.Collections.Arraylist]
* updated Start-ADReplication - added Credential
* updated Start-RecordSession - replace piping to Out-Null to $null =
* updated Test-IsDate - removed [DateTime] $d | Out-Null
* updated Test-IsNumeric - replaced piping to Out-Null with saving to a variable
* updated Test-MultipleBool - replaced += with [System.Collections.Arraylist]
* updated Test-Password - added Credential
* updated Write-StringArray - replaced += with [System.Collections.Arraylist]
* updated Write-StringHash - changed type of -Hash and error check for hashtable or arraylist
* updated Write-StringHash - replaced += with [System.Collections.Arraylist]
* updated Write-TextMenu - replaced += with [System.Collections.Arraylist]

### 2.2.8
* created .\Resources folder and moved files from the root of the modules excluding: PoshFunctions.psd1, PoshFunctions.psm1, ReadMe.md
* added additional word list file that contains over 370,000 entries for more English words
* added Convert-Int64ToText - Take an integer value and convert to English text. Valid range +/- 999,999,999,999.
* added ConvertFrom-RomanNumeral - Converts a roman numeral to a number
* added ConvertTo-RomanNumeral - Converts a number to a Roman numeral
* added Get-ArpTable - takes output from 'arp.exe -a' and parses output into objects
* added Get-Assoc - Displays file extension associations
* added Get-Ftype - Displays file types used in file extension associations
* added Get-VssAdminListVolumes - takes output from 'vssadmin.exe list volumes' and parses output into objects
* added Get-VssAdminListWriters - takes output from 'vssadmin.exe list writers' and parses output into objects
* added New-PFDateFormat - which represents a [datetime] in multiple formats
* added Test-IsLocalIPv4 - which determines if target IP address is local or remote (routed through default gateway) given the ip addresses and subnet mask
* deleted Get-Address - REST API at website no longer works
* deleted Get-GeoCode - REST API at website no longer works
* updated Convert-HexToRGB - changed 'return' to 'break' in error condition
* updated ConvertFrom-Datetime - added -ISO8601 parameter
* updated ConvertFrom-FSRight - added -IncludeInput parameter, added support for array of input
* updated ConvertTo-Datetime - added -ISO8601 parameter
* updated Expand-String - changed class name from 'ExtractData' to 'PFExtractData' to prevent conflict
* updated Get-BinaryType - changed namespace from 'Win32Utils' to 'PFWin32Utils' to prevent conflict
* updated Get-ExecutableForFile - changed class name from 'Win32API' to 'PFWin32API' to prevent conflict, changed name of internal variable
* updated Get-LongName - added -LiteralPath for explictly named paths (no wildcards), proper handling of multiple paths with wildcards
* updated Get-MacVendor - changed [ValidatePattern] to logic within function to clean up improperly formatted mac addresses, display MacAddress then Vendor
* updated Get-NTFSPermission - changed 'return' to 'break' in error condition
* updated Get-PrintableAscii - added 'Q' to similar characters regex
* updated Get-RandomDate - changed 'return' to 'break' in error condition
* updated Get-SQLDatabase - changed 'return' to 'break' in error condition
* updated Get-SQLIndexFragmentation - changed 'return' to 'break' in error condition
* updated Get-SQLStoredProcedure - changed 'return' to 'break' in error condition
* updated Get-ShortName - added -LiteralPath for explictly named paths (no wildcards), proper handling of multiple paths with wildcards
* updated Get-UrlContent - changed 'return' to 'break' in error condition
* updated Get-WordCount - function would throw errors if it encountered PowerShell keywords, implemented work around
* updated Get-Wordlist - added -Full to use longer > 370,000 word list resource, moved word list file to .\Resources
* updated New-ColorPicker - to reflect its icon file moving to .\Resources
* updated New-DatePicker - to reflect its icon file moving to .\Resources
* updated New-FontPicker - to reflect its icon file moving to .\Resources
* updated New-InputBoxSecureString - to reflect its icon file moving to .\Resources, changed 'return' to 'break' in error condition
* updated New-RandomPassword - added -FullWordlist to use longer wordlist file. Added 'Q' to similar regex
* updated New-Screenshot - changed 'return' to 'break' in error condition
* updated Optimize-SQLIndexFragmentation - changed 'return' to 'break' in error condition
* updated Optimize-SQLStoredProcedure - changed 'return' to 'break' in error condition
* updated Remove-TeamsCache - changed 'return' to 'break' in error condition
* updated Set-Display - changed class name from 'API' to 'PFAPI' to prevent conflict, changed name of internal variable
* updated Set-SpeakerVolume - added -Adjust parameter so you can adjust volume up or down
* updated Start-AdReplication - changed hard coded -ThrottleLimit from 8 to [environment]::ProcessorCount so that it determines number of processors on the fly
* updated Test-PasswordComplexity - removed dependency on Get-PrintableAscii

FileList

Version History

Version Downloads Last updated
2.2.10 10,466 10/30/2023
2.2.9 (current version) 6,667 9/30/2022
2.2.8 1,369 2/25/2022
2.2.7 236 11/17/2021
2.2.6 217 8/2/2021
2.2.5 12 8/2/2021
2.2.4 53 6/30/2021
2.2.3 35 6/3/2021
2.2.1.6 200 3/23/2021
2.2.1.5 67 2/15/2021
2.2.1.4 29 2/8/2021
2.2.1.3 63 12/17/2020
2.2.1.2 86 10/27/2020
2.2.1.1 34 10/12/2020
1.0.0.1 13 10/12/2020
Show more