Searching PowerShell Gallery for New Modules

by May 22, 2020

Categories

Tags

Administration agent-based monitoring Agentless Monitoring alert responses alert thresholds alerting Alerts Amazon Aurora Amazon EC2 Amazon RDS Amazon RDS / Aurora Amazon RDS for SQL Server Amazon Redshift Amazon S3 Amazon Web Services (AWS) Analytics application monitoring Aqua Data Studio automation availability Azure Azure SQL Database azure sql managed instance Azure VM backup Backup and recovery backup and restore backup compression backup status Backup Strategy backups big data Blocking bug fixes business architecture business data objects business intelligence business process modeling business process models capacity planning change management cloud cloud database cloud database monitoring cloud infrastructure cloud migration cloud providers Cloud Readiness Cloud Services cloud storage cloud virtual machine cloud VM clusters code completion collaboration compliance compliance audit compliance audits compliance manager compliance reporting conference configuration connect to database cpu Cross Platform custom counters Custom Views customer survey customer testimonials Dark Theme dashboards data analysis Data Analytics data architect data architecture data breaches Data Collector data governance data lakes data lineage data management data model data modeler data modeling data models data privacy data protection data security data security measures data sources data visualization data warehouse database database administration database administrator database automation database backup database backups database capacity database changes database community database connection database design database developer database developers database development database diversity Database Engine Tuning Advisor database fragmentation database GUI database IDE database indexes database inventory management database locks database management database migration database monitoring database navigation database optimization database performance Database Permissions database platforms database profiling database queries database recovery database replication database restore database schema database security database support database synchronization database tools database transactions database tuning database-as-a-service databases DB Change Manager DB Optimizer DB PowerStudio DB2 DBA DBaaS DBArtisan dBase DBMS DDL Debugging defragmentation Demo diagnostic manager diagnostics dimensional modeling disaster recovery Download drills embedded database Encryption End-user Experience entity-relationship model ER/Studio ER/Studio Data Architect ER/Studio Enterprise Team Edition events execution plans free tools galera cluster GDPR Getting Started Git GitHub Google Cloud Hadoop Healthcare high availability HIPAA Hive hybrid clouds Hyper-V IDERA IDERA ACE Index Analyzer index optimization infrastructure as a service (IaaS) infrastructure monitoring installation Integrated Development Environment interbase Inventory Manager IT infrastructure Java JD Edwards JSON licensing load test load testing logical data model macOS macros managed cloud database managed cloud databases MariaDB memory memorystorage memoryusage metadata metric baselines metric thresholds Microsoft Azure Microsoft Azure SQL Database Microsoft PowerShell Microsoft SQL Server Microsoft Windows MongoDB monitoring Monitoring Tools Monyog multiple platforms MySQL news newsletter NoSQL Notifications odbc optimization Oracle PeopleSoft performance Performance Dashboards performance metrics performance monitoring performance schema performance tuning personally identifiable information physical data model Platform platform as a service (PaaS) PostgreSQL Precise Precise for Databases Precise for Oracle Precise for SQL Server Precise Management Database (PMDB) product updates Project Migration public clouds Query Analyzer query builder query monitor query optimization query performance Query Store query tool query tuning query-level waits Rapid SQL rdbms real time monitoring Real User Monitoring recovery regulations relational databases Releases Reporting Reports repository Restore reverse engineering Roadmap sample SAP Scalability Security Policy Security Practices server monitoring Server performance server-level waits Service Level Agreement SkySQL slow query SNMP snowflake source control SQL SQL Admin Toolset SQL CM SQL code SQL coding SQL Compliance Manager SQL Defrag Manager sql development SQL Diagnostic Manager SQL Diagnostic Manager for MySQL SQL Diagnostic Manager for SQL Server SQL Diagnostic Manager Pro SQL DM SQL Doctor SQL Enterprise Job Manager SQl IM SQL Inventory Manager SQL Management Suite SQL Monitoring SQL Performance SQL Quality SQL query SQL Query Tuner SQL Safe Backup SQL script SQL Secure SQL Security Suite SQL Server sql server alert SQL Server Migration SQL Server Performance SQL Server Recommendations SQL Server Security SQL statement history SQL tuning SQL Virtual Database sqlmemory sqlserver SQLyog Storage Storage Performance structured data Subversion Support tempdb tempdb data temporal data Tips and Tricks troubleshooting universal data models universal mapping unstructured data Uptime Infrastructure Monitor user experience user permissions Virtual Machine (VM) web services webinar What-if analysis WindowsPowerShell

The official PowerShell Gallery is a public repository with thousands of free PowerShell modules. Instead of reinventing the wheel, it makes total sense to browse the gallery for reusable code that you can use as-is or as a starting point for your own projects. Let’s take a look at how you can discover and download PowerShell code from the PowerShell Gallery.

You can use its graphical frontend at https://powershellgallery.com to search for code, but a better and more powerful way is the Find-Module cmdlet. If you are looking for ways to manage Office 365 via PowerShell, here is a line that dumps all modules with the “Office” keyword in its name:

 
Name                                                  CompanyName                               PublishedDate       Description          
----                                                  -----------                               -------------       -----------          
OfficeOnlineServerDsc                                 {PowerShellTeam, gaelcolas, dsccommunity} 03.04.2020 22:01:30 The OfficeOnlineSe...
Office365DnsChecker                                   rhymeswithmogul                           30.03.2020 14:15:00 Checks a domain's ...
Microsoft.Graph.DevicesApps.OfficeConfiguration       msgraph-sdk-powershell                    17.03.2020 01:24:39 Microsoft Graph Po...
IntraOffice.ContentRepository.Powershell              rderegt                                   06.03.2020 14:26:35 Client library for...
Office365DSC                                          NikCharleboisPFE                          04.03.2020 23:13:30 This DSC module is...
Office365PowershellUtils                              joshn-whatcomtrans.net                    03.03.2020 00:26:59 A collection of cm...
Office365Cmdlets                                      CData                                     20.02.2020 20:13:29 CData Cmdlets for ...
MSPOffice365Tools                                     majorwitteman                             13.02.2020 20:26:15 Collection of Offi...
AdminToolbox.Office365                                {TaylorLee, Taylor_Lee}                   27.01.2020 15:26:36 Functions for work...
OfficeAddinManager                                    DarrenDK                                  17.12.2019 07:10:08 Module for managin...
PSP-Office365                                         powershellpr0mpt                          20.11.2019 10:57:08 Helper module to g...
Office365MailAliases                                  Cloudenius                                17.11.2019 11:57:07 This module contai...
Office365Toolkit                                      PatrickJD84                               03.09.2019 03:01:36 A collection of sc...
Office365.Connect                                     nicomartens                               22.08.2019 07:58:43 Uses the Windows C...
Office365TokenGet                                     junecastillote                            17.07.2019 03:21:07 Helps you acquire ...
BitTitan.Runbooks.Office365SecurityAndCompliance.Beta BT_AutomationEngineers                    14.05.2019 08:41:04 PowerShell module ...
BitTitan.Runbooks.Office365SecurityAndCompliance      BT_AutomationEngineers                    12.03.2019 07:22:10 PowerShell module ...
Office365Module                                       Giertz                                    24.01.2019 22:56:08 test for ez          
ZIM.Office365                                         Mikezim                                   14.12.2018 11:53:54 Provides a set of ...
MZN.Office365                                         michael.zimmerman                         14.12.2018 08:10:26 Provides a set of ...
JumpCloud.Office365.SSO                               Scottd3v                                  14.06.2018 16:13:13 Functions to enabl...
Office365GraphAPI                                     chenxizhang                               12.06.2017 15:14:57 Office 365 Graph A...
Office365Connect                                      Gonjer                                    18.05.2017 21:13:41 Office365Connect i...
RackspaceCloudOffice                                  {mlk, paul.trampert.rackspace}            28.09.2016 14:34:25 REST client for th...
Office365                                             StevenAyers                               16.07.2016 10:53:36 For Microsoft Part...
OfficeProvider                                        abaker                                    01.03.2016 21:00:35 OfficeProvider all... 
   
 

The list includes the publisher and module description, and it sorts the modules from new to old. The PublishedDate column indicates whether a module was added to the Gallery recently so you can immediately see whether it is well maintained and worth a look.

If you find a particular module interesting, dump all of its metadata:

 
PS> Find-Module -Name Office365PowershellUtils -Repository PSGallery | Select-Object -Property *


Name                       : Office365PowershellUtils
Version                    : 1.1.5
Type                       : Module
Description                : A collection of cmdlets for managing Office365
Author                     : R. Josh Nylander
CompanyName                : joshn-whatcomtrans.net
Copyright                  : (c) 2012 WTA. All rights reserved.
PublishedDate              : 03.03.2020 00:26:59
InstalledDate              : 
UpdatedDate                : 
LicenseUri                 : 
ProjectUri                 : 
IconUri                    : 
Tags                       : {PSModule}
Includes                   : {Function, RoleCapability, Command, DscResource...}
PowerShellGetFormatVersion : 
ReleaseNotes               : 
Dependencies               : {}
RepositorySourceLocation   : https://www.powershellgallery.com/api/v2
Repository                 : PSGallery
PackageManagementProvider  : NuGet
AdditionalMetadata         : @{summary=A collection of cmdlets for managing Office365; versionDownloadCount=33; ItemType=Module; 
                             copyright=(c) 2012 WTA. All rights reserved.; PackageManagementProvider=NuGet; CompanyName=Whatcom 
                             Transportation Authority; SourceName=PSGallery; tags=PSModule; created=03.03.2020 00:26:59 +01:00; 
                             description=A collection of cmdlets for managing Office365; published=03.03.2020 00:26:59 +01:00; 
                             developmentDependency=False; NormalizedVersion=1.1.5; downloadCount=296; 
                             GUID=c6b26555-2b5f-45bc-affe-ef1c31580df3; lastUpdated=02.04.2020 16:50:22 +02:00; Authors=R. Josh 
                             Nylander; updated=2020-04-02T16:50:22Z; Functions=Find-MsolUsersWithLicense 
                             Update-MsolLicensedUsersFromGroup Update-MsolUserUsageLocation Change-ProxyAddress Add-ProxyAddress 
                             Remove-ProxyAddress Set-ProxyAddress Sync-ProxyAddress Test-ProxyAddress Get-ProxyAddressDefault 
                             Enable-SecurityGroupAsDistributionGroup Disable-SecurityGroupAsDistributionGroup Start-DirSync 
                             Get-NextDirSync Suspend-UserMailbox Resume-UserMailbox Test-Mailbox Get-MailboxMemberOf 
                             Clear-MailboxMemberOf Use-Office365 Export-PSCredential Import-PSCredential; isLatestVersion=True; 
                             PowerShellVersion=3.0; IsPrerelease=false; isAbsoluteLatestVersion=True; packageSize=16635; FileList=Office3
                             65PowershellUtils.nuspec|Function_Connect-Office365.ps1|Office365PowershellUtils.psd1|Office365PowerShellUti
                             ls_mod.psm1|PSCredentials.psm1|README|SampleMigrationScripts\Monitor-MoveStats.ps1|SampleMigrationScripts\Re
                             sume-FirstFiveSuspended.ps1|SampleMigrationScripts\Set-MailboxTimeZone.ps1|SampleMigrationScripts\Set-Remote
                             RoutingAddress.ps1|SampleMigrationScripts\Set-RetentionPolicy.ps1|SampleMigrationScripts\Set-RoleAssignmentP
                             olicy.ps1; requireLicenseAcceptance=False}  
 

If you are just interested in the source code, use Save-Module and download the module to a folder of your choice:

# path to source code
$path = "c:\sources"

# name of module to investigate
$moduleName = "Office365PowershellUtils"

# create folder
$null = New-Item -Path $path -ItemType Directory

# download module
Save-Module -Name $moduleName -Path $path -Repository PSGallery

# open folder with sources
explorer (Join-Path -Path $path -ChildPath $moduleName)

If you’d like to actually use the module as-is, use Install-Module instead:

 
PS> Install-Module -Name Office365PowershellUtils -Scope CurrentUser -Repository PSGallery   
 


Twitter This Tip! ReTweet this Tip!