PowershellFunctions007
2.3.0
PowerShell utilities for configuring Windows systems, managing environments, customizing time and date settings, and automating administrative tasks.
Minimum PowerShell version
7.0
Installation Options
Owners
Copyright
(c) Peter Burbery. Some rights reserved.
Package Details
Author(s)
- Peter Cullen Burbery
Tags
windows powershell timezone utilities environment automation
Functions
Get-IanaTimeZone Get-IsoWeekDate Get-IsoOrdinalDate Restart-FileExplorer Get-PowerShellVersionDetails Add-ToPath Remove-FromPath Get-FileSize Get-FileSizeHumanReadable Bring-BackTheRightClickMenu Use-Windows11RightClickMenu Add-DefenderExclusion Get-PowershellPath Enable-LongFilePaths Clean-Path Get-PrimaryIPv4Address
PSEditions
Dependencies
This module has no dependencies.
Release Notes
Version 2.3.0: Added `Get-PrimaryIPv4Address`, a function that returns the best non-virtual, connected IPv4 address. It prioritizes interfaces like Wi-Fi, Ethernet, or Tailscale while skipping loopbacks and disconnected/virtual interfaces. Useful for cleanly logging or displaying the primary local IP.
Version 2.2.0: Added Zenodo information to including, but not limited to, CITATION.cff, and README.md. Icon URL/URI https://zenodo.org/badge/DOI/10.5281/zenodo.16699957.svg added. Help Info URI/URL 'https://github.com/PeterCullenBurbery/powershell-functions-007#readme' added.
Version 2.1.0: Publishing for Zenodo.
Version 2.0.0: I moved PowershellFunctions007 from https://github.com/PeterCullenBurbery/powershell-modules to https://github.com/PeterCullenBurbery/powershell-functions-007. URL has been updated accordingly.
Version 1.9.0: Added Clean-Path function to normalize and deduplicate the system PATH. This function expands environment variables, removes blank entries, removes case-insensitive duplicates, and broadcasts the updated environment block. Clean-Path complements Add-ToPath and Remove-FromPath by ensuring overall cleanliness of the PATH variable.
Version 1.8.2: Updated GUID. GUID was the same as PowershellFunctions@https://www.powershellgallery.com/packages/PowershellFunctions/.
Version 1.8.1: Added runtime enforcement of PowerShell 7 (Core edition) to the module file. Now, if the module is imported in an unsupported host (e.g., Windows PowerShell 5.1), it throws a clear exception. This guarantees the module is only run where PowerShell 7+ features like ?? are supported.
Version 1.8.0: This release locks the module to Windows PowerShell 7 only. This version uses 7-syntax like ?? null-coalescing operator. Fixes an issue with 0 bytes files. Before, Get-FileSizeHumanReadable "C:\empty-folder" would return " bytes". Now Get-FileSizeHumanReadable "C:\empty-folder" returns "0 bytes".
Version 1.7.3: Removed C# components. StartProcessLongFilePath was not working so I removed it.
Version 1.7.2: Update release notes.
Version 1.7.1: Removed Start-ProcessLongFilePath from the module. The DLL-based cmdlet was deemed too complex.
Version 1.7.0: Added Start-ProcessLongFilePath, a wrapper for a C#-based cmdlet that launches processes using paths exceeding Windows MAX_PATH limitations. Useful for deeply nested folders or long file names. Includes support for optional arguments.
Version 1.6.0: Added Enable-LongFilePaths to programmatically enable support for file paths longer than 260 characters. The function checks the current registry value and only modifies it if necessary.
Version 1.5.0: Add-ToPath and Remove-FromPath now automatically call `refreshenv` if available, updating the current session immediately after modifying the system PATH.
Version 1.4.0: Added Get-PowershellPath to display the PATH environment variable in a zero-padded, indexed table. Uses Format-Table for clear formatting and supports inspection of system path entries.
Version 1.3.0: Added Add-DefenderExclusion to exclude folders from Microsoft Defender. Automatically excludes the parent folder if a file is specified. Requires administrator privileges.
Version 1.2.0: Fixed Add-ToPath and Remove-FromPath to correctly resolve relative paths (e.g., ".") using Resolve-Path. Improves reliability when modifying system PATH from any location.
Version 1.1.0: Added Bring-BackTheRightClickMenu and Use-Windows11RightClickMenu to toggle classic and default context menus in Windows 11. Improved tagging and documentation.
Initial release: includes time zone resolution, ISO week and ordinal date formatting, File Explorer restart, and PowerShell version capability detection.
FileList
- PowershellFunctions007.nuspec
- PowershellFunctions007.psd1
- PowershellFunctions007.psm1