Keď som si "Get-Modul -ListAvailable", powershell bude tlač 169 modules. Napríklad:
Directory: C:\Program Files (x86)\Microsoft SQL Server\150\Tools\PowerShell\Modules
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Manifest 15.0 SQLPS {Backup-SqlDatabase, Save-SqlMigrationReport, Invoke-PolicyEvaluation, Resto...
Directory: C:\Users\user\Documents\WindowsPowerShell\Modules
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 3.0.1 DotNetVersionLister Get-STDotNetVersion
Script 1.4.7 PackageManagement {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource...}
Script 2.2.5 PowerShellGet {Find-Command, Find-DSCResource, Find-Module, Find-RoleCapability...}
Script 2.2.16 VSSetup {Get-VSSetupInstance, Select-VSSetupInstance}
Directory: C:\Program Files\WindowsPowerShell\Modules
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 1.3.1 Configuration {Import-Configuration, Export-Configuration, Get-StoragePath, Add-MetadataCo...
Keď som sa zachytiť toto v poli: "$m = Get-Modul -ListAvailable" Zdá sa, ako len jednoduchý rad, ale to tiež tlačí v týchto sekciách.
Ako to urobiť?
Tam nie je ani zdajú byť "Adresár" nehnuteľnosti na PSModuleInfo objekty.