⚠️ IMPORTANT This module is early in it´s development phase. Many API function and features are not yet available. You are welcome to contribute on GitHub to accelerate progress further.
PSDev contains a collection of utility functions. See the usage section below for a description of each tool.
To install from the PowerShell gallery using PowerShellGet run the following command:
Install-Module PSDev -Scope CurrentUser
Adds a custom ToString() method to the number variable that will print the value with magnitude notation like KB, MB for datasize and general K, M for normal numbers.
Utility function to convert values between String,Base64,Guid,HexString,IntArray,Int,CharArray,ByteArray,ScriptBlock,SecureString,SecureStringObject,BinaryStringArray,IPAddress,ByteCollection
This is a function that can analyze a string and show hidden characters like tabs, line feed, carage return etc. This is a script originally written by Michael Klement
Prints the available base console colors, foreground and background combinations
Checks version of the installed .NET Framework
This function will call the Microsoft API and retreive all urls, ips and ip-ranges that Office 365 services use.
Utilizes the ipinfo.io API to resolve the public IP of the host executing the script.
Generates a hash of a string
A function that will group objects in a specific number of groups or a specific number of objects per group. This is for instance useful if you have predefined number of jobs that you want to distribute workitems for.
This function generates new passwords. Default it will create short temporary passwords. Can be used to generate complex passwords with options to include/exclude character groups.
Removes all GitHub artifacts for a given repo or all repos on an account.
Checks if a specified IP address is included in the IP range of a specific network.
Utility function to set environment variables.
Transposes an object.
Asserts that all keys in a hashtable is true.
This function takes an IP address as input and searches for it within the IP-ranges defined by Microsoft. This is useful when troubleshooting connectivity issues with Office 365 where you need to verify if a blocked IP is in fact defined in the Microsoft IP ranges.
Checks if the specified password is present in the pwned database. Note that the password is never sent to the pwned service instead, a hash is generated of the specified password, then the first 5 characters of the hash is sent to the pwned service which then returns all hashes begining with the 5 chars and the script then checks is the full hash is present in the hash-list returned from the service.
This function will simply try to resolve the specified package name and check if the name is taken. This is useful when a owner of a package unlists the packages but the package name is still allocated to that owner. Those packages will yield no return when searching for the name on PSGallery or using Find-Module. The function circumvents this by calling the package url directly. Even if the package is unlisted the package url will still be resolved. If there is no package with that name (including unlisted) a 404 message will be returned.
Checks if there is a pending reboot.