Wilson Mar bio photo

Wilson Mar


Email me Calendar Skype call

LinkedIn Twitter Gitter Instagram Youtube

Github Stackoverflow Pinterest

Share scripting functions with others

US (English)   Español (Spanish)   Français (French)   Deutsch (German)   Italiano   Português   Estonian   اَلْعَرَبِيَّةُ (Egypt Arabic)   中文 (简体) Chinese (Simplified)   日本語 Japanese   한국어 Korean



CAUTION: An issue exists on Mac where module install requires elevated root priviledges. So no Install-Module on Mac after loading Powershell with:

sudo -s

(sudo powershell isn’t enough)

The Most downloaded module in the
https://www.powershellgallery.com is PSDscResources (from Micorosoft’s PowerShellTeam) which provides standard DSC resources.

Carbon automates configuration Windows 7, 8, 2008, and 2012 and automation the installation and configuration of Windows applications, websites, and services.

With the PowerShellGet package management module, you can:

Rather than an alphabetical list of modules at https://www.powershellgallery.com (which lists counts), below here are tables with right-align for easy comparison:

- Module Script
Search Find-Module Find-Script
- Install-Module Install-Script
- Uninstall-Module Uninstall-Script
- Get-InstalledModule Get-InstalledScript
Upload Publish-Module Publish-Script
Save Save-Module Save-Script
- Update-Module Update-Script


- Module Script
- Update-ModuleManifest Update-ScriptFileInfo
- - Find-ScriptFileInfo
- - New-ScriptFileInfo
- - Test-ScriptFileInfo

QUESTION: Modules with a single action:

- Singles
- Find-Command
- Find-DscResource
- Find-RoleCapability
- Get-PSRepository
- Set-PSRepository
Add your own Register-PSRepository
- Unregister-PSRepository


The documentation mentions only Windows and not Mac OS.

  1. BLAH: Install local help for these commands is denied:

    Update-Help -Module PowerShellGet

    PowerShellGet based on Microsoft’s OneGet core for package management.


Avoid truncation with ellipsis

Based on this, this, and this.

  1. To keep collections from being truncated and replace with “…” (ellipsis) like this:

    {Add-Content, Clear-Content, Clear-ItemProperty, Join-Path...}


    TODO: Make this happen on every terminal instantiation.

List modules available

   Get-Module -ListAvailable | out-string -Width 300

| out-string -Width 170 expands the terminal buffer to avoid having output truncated and replace with “…” (ellipsis).

The response lists modules supplied natively before custom modules are added.

    Directory: /usr/local/microsoft/powershell/6.0.0-alpha.12/Modules
ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Manifest    Microsoft.PowerShell.Archive        {Compress-Archive, Expand-Archive}                                                                              
Manifest    Microsoft.PowerShell.Host           {Start-Transcript, Stop-Transcript}                                                                             
Manifest    Microsoft.PowerShell.Management     {Add-Content, Clear-Content, Clear-ItemProperty, Join-Path...}                                                  
Manifest    Microsoft.PowerShell.Security       {Get-Credential, Get-ExecutionPolicy, Set-ExecutionPolicy, ConvertFrom-SecureString...}                         
Manifest    Microsoft.PowerShell.Utility        {Format-List, Format-Custom, Format-Table, Format-Wide...}                                                      
Binary    PackageManagement                   {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource...}                                          
Script     3.3.9      Pester                              {Describe, Context, It, Should...}                                                                              
Script    PowerShellGet                       {Install-Module, Find-Module, Save-Module, Update-Module...}                                                    
Script     0.0        PSDesiredStateConfiguration         {StrongConnect, IsHiddenResource, Write-MetaConfigFile, Get-InnerMostErrorRecord...}                            
Script     1.2        PSReadLine                          {Get-PSReadlineKeyHandler, Set-PSReadlineKeyHandler, Remove-PSReadlineKeyHandler, Get-PSReadlineOption...}      

QUESTION: How to exclude from list Manifest and system built-in items?

Where are they stored?

Such system modules are stored in an environment variable revealed by this:


Custom modules that you write go into path


   Get-Module -ListAvailable | out-string -Width 300



More on API Microservices

This is one of a series: