ReleaseNotes.txt
NOTES:
These functions are a collection of functions that either interest me, or greatly improve my productivity. I've strived to not use aliases for cmdlets or functions in my code. I've also strived to match case of function names and parameters as they exist in other places (documentation, source code), but I may not have caught all of them. I've tried NOT to rely on positional parameters in calling functions and rather explicitly named the parameters and their values. As a result of these design decisions my code may appear wordy to the reader. Many of the functions have originated from me, but not all of them. I've tried very hard to credit code that I have reused from online. If the source material is taken 'as-is' then I will label in NOTES section of function help the Source. If I modified heavily I state in same section that they were InspiredBy. All code is automatically formatted in VSCode. Here are some of the pertinent settings in VSCode that I use: "editor.formatOnPaste": false, "editor.formatOnSave": false, "editor.formatOnType": true, "editor.tabSize": 4, "editor.trimAutoWhitespace": true, "files.trimFinalNewlines": true, "files.trimTrailingWhitespace": true, "powershell.codeFormatting.autoCorrectAliases": true, "powershell.codeFormatting.ignoreOneLineBlock": true, "powershell.codeFormatting.newLineAfterCloseBrace": false, "powershell.codeFormatting.newLineAfterOpenBrace": true, "powershell.codeFormatting.useCorrectCasing": true, All code has also been loaded into ISE with ISESteroids. Most, if not all, SUGGESTIONS from ISESteroids have been applied, most often 'Missing parameter' suggestions. Code has had Invoke-ScriptAnalyzer run against them so that errors are not thrown. Invoke-ScriptAnalyzer is not perfect however and sometimes returns false positives. For those that returned false positives I added declaration statement(s) after the [Cmdlet()] block to not throw the false positive error. An example declaration is as follows: [Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSUseDeclaredVarsMoreThanAssignments','')] ### 2.2.7 * added module icon file .\PoshFunctions.ico for custom WinForms forms created * moved function aliases to within the function definition so all the code is together * added ConvertFrom-HtmlEncode - helps with decoding strings that contain HTML special characters. For instance, 'this & that' becomes 'this & that' * added ConvertTo-HtmlEncode - helps with encoding strings that contain HTML special characters. For instance, 'this & that' becomes 'this & that' * added Export-FontSample - creates HTML output of sample text formatted with all of the installed fonts on the system * added Get-CeasarCipher - a more robust version of Convert-ROT13 where you can specify the key or number of positions to shift. Aliased to 'Convert-ROT13' for backward compatibility. * added Get-DisplayBrightness - to determine current display brightness * added Get-DuplicateFileName - creates a quick list of duplicate file names within a given folder * added Get-List - function to return an array given an indeterminate number of command line parameters * added Get-String - function to return a string given an indeterminate number of command line parameters * added New-ColorPicker - presents dialog box where user can select a color. * added New-DatePicker - presents dialog box where user can select a date, can optionally include the time * added New-FontPicker - dialog that allows user to select a font from a dialog box * added Split-Line - more reliably split a string into its constituent lines. Returns an array. * added Test-MultipleBool - to do logical AND/OR across an array of boolean values * added Test-PasswordComplexity - to verify if a string is of proper length and matches all character types * added Write-StringHash - to take a given hashtable and write the code to create it * removed Convert-ROT13 - see more robust Get-CeasarCipher * renamed Set-Speaker to Set-SpeakerVolume to be better named. Set an alias to Set-Speaker for backward compatibility * renamed Union-Object to Merge-Object to get around Invoke-ScriptAnalyzer error * updated ConvertFrom-Binary - changed result to [uint64[]] to be able to convert larger numbers. * updated ConvertFrom-Hex - changed result to [uint64[]] to be able to convert larger numbers. * updated ConvertTo-Binary - changed -Number to [uint64[]] to be able to convert larger numbers. added -MinimumWidth parameter * updated ConvertTo-Hex - changed -Number to [uint64[]] to be able to convert larger numbers. added -MinimumWidth parameter, and -Prefix parameter * updated Get-ComputerUptime - to better handle Kerberos errors sometimes encountered when connecting to systems * updated Get-DriveStat - to better handle Kerberos errors sometimes encountered when connecting to systems * updated Get-LastDayInMonth - added -Date parameter and parameter set names * updated Get-MachineType - to better handle Kerberos errors sometimes encountered when connecting to systems * updated Get-ProcessUser - to better handle Kerberos errors sometimes encountered when connecting to systems * updated Get-ServiceUser - to better handle Kerberos errors sometimes encountered when connecting to systems * updated Merge-Object - aliased to 'Union-Object' for backward compatibility * updated New-InputBoxSecureString - added module custom icon * updated New-MessageBox - renamed from New-Popup (aliased for backward compatibility). added functionality for default button * updated New-RandomPassword - added -TitleCase, -RandomCase, -Web. Changed default parameter set name to ReadableTitleCase * updated Optimize-SqlIndexFragmentation - to handle error condition of index not having page level locking on. If that error is encountered it enables lock, optimizes index, then disables lock * updated Set-Display - added -Brightness to set the brightness of the display * updated Start-ADReplication - added -ThrottleLimit so as to not over saturate the local computer * updated Test-ConnectionAsync - added -Full switch and made default output brief, slight formatting change in output * updated Write-StringArray - added -ExcludeDollarSign to make it easier to create input for *.psd1 files ### 2.2.6 * added Get-MyLocalLogonTime * added Get-RelativePath * added Use-Stopwatch * updated Get-Shortcut * updated New-Shortcut * updated Start-ADReplication ### 2.2.5 * added Compare-ObjectSetComplement * added Compare-ObjectSetDifference * added Compare-ObjectSetIntersection * added Compare-ObjectSetUnion * added Get-ProcessUser * added Get-ScheduledTaskUser * added Get-ServiceUser * added Test-Set * updated Optimize-SqlIndexFragmentation * updated Optimize-SqlStoredProcedure ### 2.2.4 * added Get-SqlDatabase * added Get-SqlIndexFragmentation * added Get-SqlStoredProcedure * added Optimize-SqlIndexFragmentation * added Optimize-SqlStoredProcedure ### 2.3.3 * added Invoke-CountdownTimer to implement a count down timer. Accurate to within several seconds ### 2.2.2 * Changed to SemVer versioning, 3 positions Major#.Minor#.Build# * added Convert-Int32ToUint32 to aid in converting 32 bitmasks which are interpreted as negative int32 numbers, returned from things like (Get-Acl -Path $pwd).Access.FileSystemRights * added Format-ReverseToken to take a tokenized string like 'monster.google.com' and convert it to 'com.google.monster' * added New-InputBoxSecureString which will prompt for value and return a secure string. Can optionally verify input, and specify labels for input box(es) * renamed Get-FolderName from Get-Folder to not conflict with Vmware module. Aliased to Get-Folder for backward compatibility * renamed Get-SaveFileName from Get-SaveFile to be more consistent across file/folder functions. Aliased to Get-SaveFile for backward compatibility * updated Convert-RGBToHex to better handle color specifications * updated ConvertTo-DateTime because of logic error in handling Unix datetime strings * updated Get-BashPath to include switch so as to not resolve path to existing path on the system * updated Get-FileWithLeadingSpace to just produce the fullname of the files * updated Get-Fortune and added -Speak switch * updated Get-NTFSPermission to use Convert-Int32ToUint32 for certain filesystem rights, like -1610612736 corresponds to GenericExecute,GenericRead and previously the negative number would throw an error as it is really a 32 bitmask and not an int32 * updated Test-Port so that the results are given in the Process block and not wait until the End block ### 2.2.1.6 * 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 * 16 ADDITIONS * added Convert-HexToRGB - accepts HEX strings with or without # prefix, has -IncludeInput parameter which will list not only the RGBString but also Red, Green, Blue values, changed to allow for pipeline input and multiple hex strings * added Convert-RGBToHex - can either accept RGB strings or explicitly specified -Red -Green -Blue parameters, has -IncludeInput and -Prefix 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. Optionally can convert to lowercase first, then title case it. * 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) * 15 REMOVED * removed Convert-ARGBToHex - I didn't use any colors with the A attribute, and the function didn't provide flexibility in output * removed Convert-HexToARGB - I didn't use any colors with the A attribute, and the function didn't provide flexibility in output * removed ConvertTo-Markdown - does not function as expected and I never use this function * removed ConvertTo-PlainText - better to use Convert-SecureStringToString * removed ConvertTo-SecureText * removed Get-OperatingSystemSKU - never use this function * removed Get-PoshFunctionsPrivateData - can get the same information by: (Get-Module PoshFunctions).PrivateData * removed Get-Share - use the Get-SMBShare command from SmbShare module * removed Get-SharePermission - use GetSMBShareAccess command from SmbShare module * removed Get-ShareStat * removed Help - relied on external tool less.exe which is a port of a Linux tool that is a paginated more.com where you can go forward or backward * removed Remove-BOMFromFile - can get functionality by using Notepad++ * removed Remove-InvalidFileNameChar - not needed can code around it with Get-InvalidFileCharacter * removed Search-Method - really didn't work * 4 RENAMED * 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 * 55 UPDATED * 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 ### 2.2.1.5 * added Release Notes * added Get-DiceRoll * added Get-NetworkCredential * added New-Credential * added PoshFunctions.png * added PoshFunctions.xcf * added ReadMe.html * added Test-IsNull * updated Format-RandomCase * updated Get-PoshFunctionsPrivateData * updated PoshFunctions.psd1 * updated ReadMe.md ### 2.2.1.4 - Published 9 February 2021 * added Compare-PSGalleryObject * added Get-PoshFunctionsPrivateData * added Get-WordList * added Start-ADReplication * added Write-StringArray * added Write-TextMenu - copied from my PSGallery script New-TextMenu * renamed Words.txt to WordList.txt * updated Convert-ROT13 * updated ConvertFrom-DateTime * updated ConvertTo-DateTime * updated Format-WrapText * updated Get-DNSHostEntryAsync * updated Resolve-FQDN * updated Test-ConnectionAsync ### 2.2.1.3 - Published 16 December 2020 * added Words.txt - list of English words * added Expand-IPv6 * added Format-RandomCase * added Get-PrintableAscii * added Invoke-Beep * added Measure-Char * added Test-IsValidIPv6 * updated Convert-ROT13 * updated ConvertTo-DecimalIPv4 * updated ConvertTo-DottedDecimalIPv4 * updated ConvertTo-SecureText * updated Get-DNSHostEntryAsync * updated Get-SubnetMaskIPv4 * updated Set-PrivateProfileComment * updated Show-SubnetMaskIPv4 * updated Test-IsValidIPv4 ### 2.2.1.2 * added Docs folder filled with .md files * added Docs\HTML folder * updated PSGetModuleInfo.xml * updated PoshFunctions.psd1 * updated ReadMe.md ### 2.2.1.1 * added Compare-ObjectProperty, Convert-ARGBToHex, Convert-HexToARGB, Convert-ObjectToHashtable, Convert-ROT13, Convert-SecureStringToString, Convert-UserFlag, ConvertFrom-Base64, ConvertFrom-DateTime, ConvertFrom-FsRight, ConvertFrom-UrlEncode, ConvertFrom-UTC, ConvertFrom-Xml, ConvertTo-Base64, ConvertTo-BinaryIPv4, ConvertTo-Bool, ConvertTo-DateTime, ConvertTo-DecimalIPv4, ConvertTo-DottedDecimalIPv4, ConvertTo-Markdown, ConvertTo-OrderedDictionary, ConvertTo-PlainText, ConvertTo-SecureText, ConvertTo-UncPath, ConvertTo-UrlEncode, ConvertTo-UTC, Copy-Object, Eexit, Expand-String, Expand-Tab, Export-CSVSortedColumn, FileSizeAbove, FileSizeBelow, Format-MacAddress, Format-ReverseString, Format-SortedList, Format-WrapText, Get-BashPath, Get-BinaryType, Get-ComputerSite, Get-DNSHostEntryAsync, Get-DriveStat, Get-Enum, Get-ExecutableForFile, Get-FileEncoding, Get-FileName, Get-FileWithLeadingSpace, Get-Folder, Get-Font, Get-Fortune, Get-InstalledModuleVersion, Get-IpRange, Get-LastReboot, Get-MachineType, Get-MacVendor, Get-Magic8Ball, Get-Md5Sum, Get-NTFSPermission, Get-NtpDate, Get-OperatingSystemSKU, Get-Power, 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-Share, Get-SharePermission, Get-ShareStat, Get-Shortcut, Get-SID, Get-StaticProperty, Get-SubnetMaskIPv4, Get-TruncatedDate, Get-Type, Get-UrlContent, Get-WordCount, grep, Help, Invoke-Speak, Join-Object, Lock-Workstation, mklink, Move-ToRecycleBin, New-InputBox, New-Popup, New-QR, New-Screenshot, New-Shortcut, Read-HostWithDefault, Remove-BlankOrComment, Remove-BOMFromFile, Remove-EmptyProperty, Remove-InvalidFileNameChar, Remove-QuotesFromCsv, Remove-Trailing, Reset-Desktop, Resolve-FQDN, Resolve-HostName, Search-Method, 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-InvalidFileCharacter, Show-Month, Show-NamedColor, Show-Object, Show-Progress, Show-ShortDaysOfWeek, Show-ShortMonth, Show-SpecialFolder, Show-SubnetMaskIPv4, Show-Timezone, Show-TypeAccelerator, Start-RecordSession, Stop-RecordSession, Switch-Mute, Test-ConnectionAsync, Test-IsAdmin, Test-IsCapsLock, Test-IsDate, Test-IsFileLocked, Test-IsHexString, Test-IsNumeric, Test-IsNumLock, Test-IsScrollLock, Test-IsValidEmailAddress, Test-IsValidIPv4, Test-NtpDateVsNow, Test-Port, Union-Object, Update-ExplorerIcon |