{"id":13596552,"url":"https://github.com/riedyw/PoshFunctions","last_synced_at":"2025-04-09T16:33:03.732Z","repository":{"id":49591814,"uuid":"268355210","full_name":"riedyw/PoshFunctions","owner":"riedyw","description":"A curated collection of PowerShell scripts packaged into a module.","archived":false,"fork":false,"pushed_at":"2024-12-19T14:21:18.000Z","size":4452,"stargazers_count":78,"open_issues_count":5,"forks_count":15,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-04T06:43:59.921Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/riedyw.png","metadata":{"files":{"readme":"ReadMe.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-31T20:06:26.000Z","updated_at":"2025-03-28T08:49:30.000Z","dependencies_parsed_at":"2024-05-31T19:36:17.951Z","dependency_job_id":"df2e3d71-7d96-4b41-a6df-ac500ddbcd63","html_url":"https://github.com/riedyw/PoshFunctions","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riedyw%2FPoshFunctions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riedyw%2FPoshFunctions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riedyw%2FPoshFunctions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riedyw%2FPoshFunctions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/riedyw","download_url":"https://codeload.github.com/riedyw/PoshFunctions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248067973,"owners_count":21042393,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T16:02:34.123Z","updated_at":"2025-04-09T16:32:58.722Z","avatar_url":"https://github.com/riedyw.png","language":"PowerShell","funding_links":[],"categories":["PowerShell"],"sub_categories":[],"readme":"# PoshFunctions\n\nA curated list of Powershell functions and filters wrapped into a module. Over 225 functions/filters.\n\n## Install the module\n\nTo install the module run the following command:\n\n    Install-Module PoshFunctions\n\nCopy the `PoshFunctions` folder into one of the folders specified in the `$env:PSMODULEPATH` folders.\n\nTo display the paths enter the following command.\n\n    $env:PSMODULEPATH\n\nTo display in a way better understood by you the human:\n\n    $env:PSMODULEPATH -Split ';'\n\nOr you can save it to a variable\n\n    $ModPath = $env:PSMODULEPATH -Split ';'\n\nThen you can reference a particular path\n\n    $ModPath[1]\n\n\n## Import the module\n\nTo import the module enter the following command\n\n    Import-Module -Name PoshFunctions\n\n## Functions\n\nFor the functions themselves see [**Functions**](Functions) folder.\n\n    Name                           Synopsis\n    ----                           --------\n    Compare-ObjectProperty         Compares two objects property by property.\n    Compare-ObjectSetComplement    Compares 2 arrays of strings and returns The SET COMPLEMENT of the arrays\n    Compare-ObjectSetDifference    Compares 2 arrays of strings and returns The SET DIFFERENCE of the arrays\n    Compare-ObjectSetIntersection  Compares 2 arrays of strings and returns The SET INTERSECTION of the arrays\n    Compare-ObjectSetUnion         Compares 2 arrays of strings and returns The SET UNION of the arrays\n    Compare-PSGalleryObject        Compares the installed module(s) or script(s) that have been installed from\n                                   PowerShellGallery.com\n    ConvertFrom-Base64             Convert from a Base64 string to normal string\n    ConvertFrom-Binary             Convert an string or string array from binary to an integer\n    ConvertFrom-DateTime           Converts a datetime into a datetime represented in a different format.\n    ConvertFrom-FsRight            To convert a [uint32] FileSystemRight value into a human readable form\n    ConvertFrom-Hex                Convert an string or string array from hexadecimal to an integer\n    ConvertFrom-HexString          Convert a hex string or array of hex string to text\n    ConvertFrom-HtmlEncode         Converts a URL encoded string back into a normal string\n    ConvertFrom-RomanNumeral       Converts a roman numeral to a number.\n    ConvertFrom-UrlEncode          Converts a URL encoded string back into a normal string\n    ConvertFrom-UTC                Converts a datetime from UTC to local time\n    ConvertFrom-XML                Convert XML to an object\n    Convert-HexToRGB               Converts Hex to RGB values\n    Convert-Int32ToUint32          Converts int32 values to uint32 values\n    Convert-Int64ToText            Convert integer to English text\n    Convert-ObjectToHashtable      Takes a single object and converts its properties and values into a hashtable.\n    Convert-RGBToHex               Converts an RGB color string to hex equivalent\n    Convert-SecureStringToString   Converts a SecureString value back to a plaintext string\n    ConvertTo-Base64               ConvertTo-Base64 converts a normal string to a base 64 string\n    ConvertTo-Binary               Convert an integer or array of integers to binary\n    ConvertTo-BinaryIPv4           Converts a Decimal IP address into a binary format.\n    ConvertTo-Bool                 Parse a string and convert it to a Boolean\n    ConvertTo-DateTime             Converts a formatted date string back into a datetime datatype.\n    ConvertTo-DecimalIPv4          Converts a Dotted Decimal IP address into a 32-bit unsigned integer.\n    ConvertTo-DottedDecimalIPv4    Returns a dotted decimal IP address.\n    ConvertTo-Hex                  Convert an integer or array of integers to hexadecimal\n    ConvertTo-HexString            Convert a string or array of string to hex strings\n    ConvertTo-HtmlEncode           To encode plaintext using [Web.HttpUtility]::HtmlEncode()\n    ConvertTo-OrderedDictionary    Converts a HashTable, Array, or an OrderedDictionary to an OrderedDictionary.\n    ConvertTo-RomanNumeral         Converts a number to a Roman numeral.\n    ConvertTo-UncPath              A simple function to convert a local file path and a computer name to a network\n                                   UNC path.\n    ConvertTo-UrlEncode            To encode plaintext using [Web.HttpUtility]::UrlEncode()\n    ConvertTo-UTC                  Converts a datetime from local time to UTC\n    Convert-UserFlag               Converts a userflag enumeration to a human readable list of attributes about an\n                                   AD object.\n    Copy-Object                    To copy an object to standard output\n    Eexit                          Closes the transcript, and exits the PowerShell session\n    Expand-IPV6                    Takes an abbreviated IPv6 string and expands it fully\n    Expand-String                  Expanding a string expression. Can handle Powershell string expressions or\n                                   Environment variable expansion.\n    Expand-Tab                     To expand tab characters to spaces\n    Export-CSVSortedColumn         Sorts the column names alphabetically and exports to csv\n    Export-FontSample              Exports an HTML file containing sample text formatted in all the fonts installed on\n                                   the current system.\n    Format-MacAddress              Function to cleanup a MACAddress string\n    Format-RandomCase              Formats a string character by character randomly into upper or lower case.\n    Format-ReverseString           To reverse a string, or an array of strings\n    Format-ReverseToken            To reverse a string that is broken into tokens by a delimiter\n    Format-SortedList              Creates a formatted list with properties sorted alphabetically\n    Format-TitleCase               Get the last day of the month given the year as an integer, and the month as\n                                   an integer\n    Format-WrapText                Wraps text at a particular column width\n    Get-ArpTable                   Gets the dynamic entries in the arp table and parses them into IPAddress and\n                                   MACAddress\n    Get-Assoc                      Displays file extension associations\n    Get-BashPath                   To take a normal Windows path and convert it to a bash path for things like git bash.\n    Get-BinaryType                 Gets the binary executable type for a given set of files\n    Get-CeasarCipher               Shifts letters in string by a certain number of positions. Default shift is 13\n                                   characters or the classic ROT13.\n    Get-ComputerSite               Determines the Active Directory site of a specified computername(s). Relies on\n                                   nltest.exe that comes with Windows\n    Get-ComputerUptime             To mimic and extend the Get-ComputerUptime function found in PowerShell 6 or 7\n    Get-ConsoleWindowSize          Gets the current the window size and buffer size of the current console window\n    Get-DiceRoll                   Simulates rolling gaming dice\n    Get-DiskType                   A quick function to determine what type of local disk a computer has\n    Get-DisplayBrightness          To get the current brightness of the display\n    Get-DNSHostEntryAsync          Performs a DNS Get Host asynchronously\n    Get-DriveStat                  To get statistics on drives on a particular server or servers.\n    Get-DuplicateFileName          To find duplicate file names within a given folder\n    Get-Enum                       To get the static values of enum datatypes\n    Get-ErrorInfo                  Returns errors in a concise object\n    Get-ExecutableForFile          Given a file, determine what program is associated with file.\n    Get-Factorial                  Determine the factorial of a given integer value\n    Get-FileEncoding               To get the file encoding of a file\n    Get-FileName                   Gets a filename through the native OpenFileDialog. Can select a single file or\n                                   multiple files.\n    Get-FileSizeOnDisk             Powershell script to get file size and size on disk of all files in a directory.\n    Get-FileWithLeadingSpace       To find files that begin with a space character\n    Get-FolderName                 Gets a foldername through the native OpenFileDialog.\n    Get-Font                       Gets the fonts currently loaded on the system\n    Get-Fortune                    Display a short quote\n    Get-Ftype                      Displays file types used in file extension associations\n    Get-InvalidFileCharacter       Gets invalid filename characters\n    Get-IpRange                    Given a subnet in CIDR format, get all of the valid IP addresses in that range.\n    Get-IpV4Network                Given a subnet in CIDR format, get all of the valid IP addresses in that range.\n    Get-LastDayInMonth             Get the last day of the month given the year as an integer, and the month as\n                                   an integer\n    Get-List                       Returns an array given an indeterminate number of command line arguments.\n    Get-LongName                   To get the longname of a provided shortname (8.3) of a file or folder\n    Get-MachineType                A quick function to determine if a computer is VM or physical box.\n    Get-MacVendor                  Resolve MacAddresses To Vendors\n    Get-Magic8Ball                 Get one of the answers from the magic 8 ball.\n    Get-Md5Sum                     To calculate an Md5Sum for a file\n    Get-MyLocalLogonTime           Gets local logon time for the current user\n    Get-NetworkCredential          Returns a [System.Net.NetworkCredential] given a passed [PSCredential] parameter\n    Get-NTFSPermission             To get permission information on a specified Path or folder name\n    Get-NtpDate                    To get the time from an NTP server\n    Get-Power                      Provides exponentian\n    Get-PrintableAscii             Gets an array of objects that show printable Ascii characters.\n    Get-PrivateProfileComment      To get comments from an .ini file\n    Get-PrivateProfileSection      To get data out of an .ini file\n    Get-PrivateProfileSectionNames To get the section names out of an .ini file\n    Get-PrivateProfileString       To get data out of an .ini file\n    Get-ProcessUser                Get a list of processes and the user context that they run under. By default excluded\n                                   system tasks\n    Get-PSWho                      Get PowerShell user summary information\n    Get-RandomDate                 Gets a random date\n    Get-RandomHexDigit             Gets a random hex digit, or a string of hex digits\n    Get-RandomMacAddress           Gets a random sequence of 12 hexadecimal digits\n    Get-RegExpandString            Retrieves a null-terminated string that contains unexpanded references to environment\n                                   variables (REG_EXPAND_SZ) from local or remote computers.\n    Get-RegistryValue              Get the values from a specified registry key\n    Get-RelativePath               Get a relative path to a specified list of paths relative to a specified path\n    Get-Round                      Correctly rounds a number. Optionally can specify the number of digits to round to.\n    Get-SaveFileName               Gets a filename through the native SaveFileDialog.\n    Get-ScheduledTaskUser          Get a list of scheduled tasks and the user context that they run under. By default\n                                   excluded system tasks\n    Get-ServiceUser                Get a list of services and the user context that they run under. By default excluded\n                                   services running as system\n    Get-Shortcut                   Get information about a Shortcut (.lnk file)\n    Get-ShortName                  To get the shortname 8.3 of a file or folder\n    Get-SID                        To get the SID of a specified domain user passed as either an (email) or\n                                   (domain,username)\n    Get-SpecialFolder              Gets special folder name location\n    Get-SqlDatabase                Get list of SQL databases\n    Get-SqlIndexFragmentation      Get SQL Index Fragmentation\n    Get-SqlStoredProcedure         Get SQL Stored Procedures\n    Get-StaticProperty             To list the static properties of a .NET class\n    Get-String                     Returns a string given an indeterminate number of command line arguments.\n    Get-StringHash                 To calculate a hash for provided strings\n    Get-SubnetMaskIPv4             Gets a dotted decimal subnet mask given the number of bits in the mask\n    Get-TruncatedDate              To truncate a date at a given level\n    Get-Type                       Get exported types in the current session\n    Get-TypeAccelerator            Gets type accelerators\n    Get-UrlContent                 To get the HTML content of a specified URL\n    Get-VssadminListVolumes        Runs 'vssadmin.exe list volumes' and parses the output into objects\n    Get-VssadminListWriters        Runs 'vssadmin.exe list writers' and parses the output into objects\n    Get-WordCount                  Gets summary statistics of all the words and how many of each there are\n    Get-WordList                   Returns a list of over 38,000 words.\n    Invoke-Beep                    Uses the Beep function of the .Net [Console] class\n    Invoke-CountdownTimer          Invokes a countdown timer\n    Invoke-SoundPlayer             Use the SoundPlayer in Powershell. Can be synchronous or asynchronous.\n    Invoke-Speak                   Use the speech synthesizer in Powershell. Can be synchronous or asynchronous. Option\n                                   for random voice.\n    Join-Object                    Combines two object lists based on a related property between them.\n    Lock-Workstation               Locks the workstation\n    Measure-Char                   To count the number of times a character appears in a string, or an array of strings.\n    Merge-Object                   Returns a 'clean' array of objects that have all property names in each element of\n                                   the array\n    mklink                         mklink calls out to the Command Prompt (cmd.exe) and creates a link\n    Move-ToRecycleBin              Instead of outright deleting a file, why not move it to the Recycle Bin?\n    New-ColorPicker                Present a dialog to the user and allow them to select or define a color. User can\n                                   choose how the color will be returned.\n    New-Credential                 Returns a [PSCredential] given a passed UserName, and either a string 'Password' or\n                                   a securestring 'SecureString'\n    New-DatePicker                 Provides a GUI representation of a calendar where you select a date. Click OK or\n                                   press [Enter] to return the date selected. If click Cancel or press [Esc] $null\n                                   is returned.\n    New-FontPicker                 Present a dialog to the user and allow them to select a font and its characteristics\n    New-Inputbox                   Display a Visual Basic style inputbox.\n    New-InputBoxSecureString       Provides a GUI text entry box to enter a string and convert it to a securestring\n    New-MessageBox                 New-Popup will display a message box. If a timeout is requested it uses Wscript.Shell\n                                   PopUp method. If a default button is requested it uses the ::Show method from\n                                   'Windows.Forms.MessageBox'\n    New-PFDateFormat               Returns a [psobject] with a [datetime] in multiple other formats\n    New-QR                         Create New Quick Response Code\n    New-RandomPassword             Creates a new random password\n    New-ScreenShot                 To take a screenshot and save it to a file.\n    New-Shortcut                   This script is used to create a  shortcut.\n    Optimize-SqlIndexFragmentation Optimize SQL Index Fragmentation\n    Optimize-SqlStoredProcedure    Optimize SQL Stored Procedures\n    Out-PDFToPrinter               To print a .PDF to the default printer\n    Read-HostWithDefault           A wrapper for Read-Host that includes a default value. Optionally can provide\n                                   a prompt.\n    Remove-EmptyProperty           To take an object and return only non-empty properties\n    Remove-QuotesFromCsv           Removes quotes from a CSV data set. Can optionally set $Delimiter to another\n                                   character.\n    Remove-TeamsCache              Removes the data that is in the Teams cache for the current user\n    Reset-Desktop                  Forces a reset of the desktop\n    Resolve-FQDN                   Resolves a hostname or IPv4 address to a fully qualified domain name\n    Resolve-HostName               Resolves a hostname to an IPv4 address.\n    Set-Capslock                   Sets the state of the CapsLock button.\n    Set-Display                    Set-Display turns the display on or off via energy saver api. Can also set display\n                                   brightness\n    Set-Numlock                    Sets the state of the NumLock button. If you pass $true to function it will turn on\n                                   NumLock.\n    Set-PrivateProfileComment      To place comment(s) in an .ini file. Comments are lines that begin with a\n                                   semicolon ';'.\n    Set-PrivateProfileString       To set data in an .ini file\n    Set-Scrolllock                 Sets the state of the ScrollLock button.\n    Set-SpeakerVolume              Sets the speaker volume.\n    Set-WindowState\n    Set-WindowStyle                To control the behavior of a window\n    Show-AllColor                  Shows all console colors\n    Show-Calendar                  Displays a visual representation of a calendar.\n    Show-Color                     Show-Color displays the names and values of the console colors\n    Show-ColorsWithBackground      Show-ColorsWithBackground displays all combinations of foreground/background of the\n                                   console colors.\n    Show-DaysOfWeek                Shows the days of the week\n    Show-FileAttribute             Shows the available file attributes\n    Show-FsRight                   To list all potential file system rights\n    Show-Month                     Shows the months\n    Show-NamedColor                Shows all named colors\n    Show-Object                    Takes an object and displays a new window containing the object, and you can drill\n                                   down on its properties.\n    Show-Progress                  Show progress as items pass through a section of the pipline\n    Show-ShortDaysOfWeek           Show short days of the week\n    Show-ShortMonth                Shows short month\n    Show-SubnetMaskIPv4            Show IPv4 subnet masks\n    Show-Timezone                  Show timezone information\n    Split-CanonicalName            To split a CanonicalName string line by into its constituent parts which are\n                                   separated by a /\n    Split-DistinguishedName        To split a DistinguishedName string line by into its constituent parts which are\n                                   separated by a comma\n    Split-Line                     To split a string line by line and return a string array\n    Start-ADReplication            Forces replication to occur between domain controllers in domain.\n    Start-RecordSession            Creates a transcript of current Powershell session\n    Stop-RecordSession             Stops the running transcript\n    Switch-Mute                    Toggles speaker mute\n    Test-ConnectionAsync           Performs a ping test asynchronously\n    Test-CSVFormat                 Verifies the format of CSV file and that each row has the same number of fields as\n                                   the header row\n    Test-IsAdmin                   Determines if you are running elevated (as Administrator)\n    Test-IsCapsLock                Determines if the CapsLock key is on or not\n    Test-IsDate                    Tests to see if the specified string is a valid [datetime] string\n    Test-IsFileLocked              Determine if a file is locked.\n    Test-IsHexString               Tests to determine if a string is a valid hexadecimal number. Can optionally include\n                                   a prefix of '0x' or '#'\n    Test-IsLocalIPv4               Tests to determine if a specified IPv4 address is LOCAL or REMOTE (must be sent to\n                                   default gateway). Aliased to 'Test-IsLocalIP'\n    Test-IsNull                    Given a passed [string] tests to determine if .IsNullOrEmpty() or\n                                   .IsNullOrWhitespace(), with .IsNullOrEmpty() being the default\n    Test-IsNumeric                 Determines if specified string can be parsed to a number\n    Test-IsNumLock                 Determines the state of NumLock\n    Test-IsScrollLock              Sets the state of the ScrollLock button. If you pass $true to function it will turn\n                                   on ScrollLock.\n    Test-IsValidEmailAddress       Tests validity if specified string is an email address.\n    Test-IsValidIPv4               Verifies if passed parameter is a valid IP v4 address\n    Test-IsValidIPv6               Verifies if passed parameter is a valid IP v6 address\n    Test-MultipleBool              Takes multiple bool values and applies a boolean operator against them to get an\n                                   answer\n    Test-Network                   Wrapper function for Get-IpRange, Test-ConnectionAsync, and Get-DNSHostEntryAsync to\n                                   give summary table of ip addresses that either resolve to a host name or respond to\n                                   a ping\n    Test-NtpDateVsNow              To test whether local time and NTP time fall within a particular tolerance\n    Test-Password                  To validate credentials and return a boolean\n    Test-PasswordComplexity        Tests a password for length and password complexity\n    Test-Port                      Tests a Port or a range of ports on a specific ComputerName(s).\n    Test-Set                       Compares 2 arrays of strings and determines if they are EQUAL, SUBSET, SUPERSET,\n                                   or UNEQUAL\n    Update-ExplorerIcon            Updates Explorer icons\n    Use-Stopwatch                  Uses a stopwatch datatype found in module. Can get stopwatch status, start, stop,\n                                   reset, or restart.\n    Write-SelectStatement          From a single object with named properties it will write out a select statement that\n                                   will join array elements.\n    Write-StringArray              Takes [string] or [string[]] input and writes the code that would create a string\n                                   array with that information.\n    Write-StringHash               Takes [hashtable] input and writes the code that would create a hashtable with that\n                                   information.\n    Write-TextMenu                 Creates the logic for a new simple text based menu. Originally published as script\n                                   New-TextMenu in the PowerShellGallery\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friedyw%2FPoshFunctions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Friedyw%2FPoshFunctions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friedyw%2FPoshFunctions/lists"}