Indented.Common is a library of common functions required by and shared across several of my modules.

Indented.Common is required by:

Indented.Common provides module update functionality, but is not required for:

Requirements

  • Your execution policy must be set to a minimum of AllSigned, Indented.Common is signed.
  • A minimum of PowerShell 3.0; The module has also been tested under PowerShell 4.0.

Installation

Automatic installation

This code will execute using your privileges it is wise to review the script prior to running the command below. The script is not subject to or limited by execution policies.

Open PowerShell then execute the following command to invoke the web-based installer:

Manual installation

The automatic installer executes these steps on your behalf.

  1. Create the folder LibrariesDocumentsWindowsPowerShellModules (Documents will exist, all other folders may need to be created).
  2. Download Indented.Common.
  3. Extract the folder in the zip file to LibrariesDocumentsWindowsPowerShellModules.
  4. Execute the command below to verify the module is now installed.

Updates

  • 1.21 –
    • New-BinaryReader: Added capacity check to PeekByte method.
    • Get-Hash: Replaced use of Get-Content with IO.FileStream (memory consumption problem).
  • 1.20 – Get-Hash: Fixed parameter validation omission.
  • 1.19 – Trivial format bug fixes (non-functional change).
  • 1.18 – Get-Hash: Added.
  • 1.17 – Signed module files.
  • 1.16 – ConvertTo-String: Fixed ByPropertyName pipeline input.

Module commands

Exported commands

CmdLet Category Description
New-BinaryReader .NET: Extended classes Create a new extended instance of a System.IO.BinaryReader class from a Byte Array.
New-DynamicModuleBuilder .NET: Type builders Creates a new assembly and a dynamic module within the current AppDomain.
New-Enum .NET: Type builders Creates a new enum (System.Enum) from a hashtable using an existing instance of ModuleBuilder.
Get-IndentedModule Module management Get a list of available Indented.* modules from the local system.
Install-IndentedModule Module management Installs or updates Indented.* modules.
Get-IndentedAutoUpdate Module management Get the auto-update configuration for Indented modules.
Set-IndentedAutoUpdate Module management Set auto-update configuration for Indented modules.
Start-IndentedAutoUpdate Module management Start an update process for all installed Indented.* modules.
New-Socket Socket handling Creates a new network socket to use to send and receive packets over a network.
Connect-Socket Socket handling Connect a TCP socket to a remote IP address and port.
Disconnect-Socket Socket handling Disconnect a connected TCP socket.
Remove-Socket Socket handling Removes a socket, releasing all resources.
Receive-Bytes Socket handling Receive bytes using a TCP or UDP socket.
Send-Bytes Socket handling Sends bytes using a TCP or UDP socket.
Get-LdapObject S.DS.P Get objects from an LDAP directory using System.DirectoryServices.Protocols.
Get-WmiClass WMI Get an instance of a ManagementClass.
Get-WmiPath WMI Get an instance of a ManagementObject using a specific management path.
Compare-Array Utility Compares two arrays to determine equality.
ConvertTo-Byte Utility Converts a value to a byte array.
ConvertTo-String Utility Converts a byte array to a string value.
ConvertTo-TimeSpanString Utility Converts a number of seconds to a string.
Get-DnsServerList Utility Gets a list of network interfaces and attempts to return a list of DNS server IP addresses.
Get-DotNetVersion Utility Get all versions of .NET available on the local machine.
Get-Hash Utility Get a hash for the requested object.
Get-WebContent Utility A function to simulate wget style calls.
New-Password Utility Creates a new complex password.
Test-AdminRoleHolder Utility Tests to see if the current user holds an admin role.
Test-IsLocalhost Utility Tests whether or not the name or IP address value is the local system.

Internal commands

CmdLet Category Description
NewIndentedAutoUpdateHash Module management Creates a new hash of several fields from the autoupdate configuration file.

2 Comments

  1. Download link not working.
    Im trying to download your Indented.NetworkTools.zip and Indented.Common.zip but the link are not working anymore

    Reply

    • Common is deprecated, I need to tidy up.

      NetworkTools (at least the network calculators part) can be downloaded from the PSGallery:

      Install-Module Indented.Net.IP

      Reply

Leave a Reply

Your email address will not be published. Required fields are marked *