示例 PSC:\Users\admin>Get-Module-ListAvailable 目录: C:\Program Files\WindowsPowerShell\Modules ModuleType Version Name ExportedCommands---Script 1.0.1 Microsoft.PowerShell.Operation.V...{Get-OperationValidat...Binary 1.0.0.1 PackageManagement{Find-Package,Get-Pa...Script 3.4.0 Pester{Describe,C...
下載PowerShell 本主題的部分內容可能是機器或 AI 翻譯。版本 PSResourceGet 1.x 搜尋 概觀 管理PowerShell 套件 PowerShell 資源庫 參考 Microsoft.PowerShell.PSResourceGet PowerShellGet 命令 Find-Command Find-DscResource Find-Module Find-RoleCapability Find-Script Get-InstalledModule Get-InstalledScript...
Cmdlet Get-Module 會列出已匯入或可匯入 PowerShell 會話的 PowerShell 模組。 如果沒有參數, Get-Module 取得已匯入目前會話的模組。 ListAvailable 參數可用來列出可從 PSModulePath 環境變數中指定的路徑匯入的模組, ($env:PSModulePath) 。 傳回的模組物件 Get-Modul
PowerShell 复制 Update-Module [[-Name] <String[]>] [-RequiredVersion <String>] [-MaximumVersion <String>] [-Credential <PSCredential>] [-Scope <String>] [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-Force] [-AllowPrerelease] [-AcceptLicense] [-PassThru] [-WhatIf] [-Confirm] ...
cmdletUpdate-Module从联机库安装模块的最新版本。 系统会提示在安装更新之前确认更新。 汇报仅针对使用Install-Module的本地计算机上安装的模块安装。Update-Module搜索$env:PSModulePath已安装的模块。 这是Microsoft.PowerShell.PSResourceGet中 cmdlet 的代理Update-PSResourcecmdlet。 有关详细信息,请参阅Update-PSResou...
powershellCopy Code # 获取一个已存在的分区(这里选择第一个磁盘上的第一个分区,可以根据实际情况调整) $partition = Get-Partition -DiskNumber 1 -PartitionNumber 1 # 挂载分区到一个空闲驱动器号 Add-PartitionAccessPath -Partition $partition -AssignDriveLetter # 卸载分区(移除驱动器号) Remove-PartitionAc...
git clone https://github.com/PowerShell/PowerShellGet Navigate to the source directory cd path/to/PowerShellGet Import the module Import-Modulesrc/PowerShellGet-Force Code of Conduct Please see ourCode of Conductbefore participating in this project. ...
powershellCopy Code Import-Module ActiveDirectory Get-ADUser -Filter 'Name -like "*Smith*"' | Select-Object Name, SamAccountName, Enabled 这个命令需要 Active Directory PowerShell 模块,并列出所有名字中包含 "Smith" 的 AD 用户。 22. 自动化网络配置 WMIC: WMIC 可以查询网络配置,但不适合进行复杂的...
Microsoft.PowerShell.Core 列出当前会话中导入的模块,或者可从 PSModulePath 导入的模块。 语法 PowerShell Get-Module[[-Name] <String[]>] [-FullyQualifiedName <ModuleSpecification[]>] [-All] [<CommonParameters>] PowerShell Get-Module[[-Name] <String[]>] [-FullyQualifiedName <ModuleSpecification[...
Import-Module Get-ChildItemColor 基于Get-ChildItemColor自定义颜色 references [Change PowerShell console syntax highlighting colors of PSReadLine – 4sysops](https://4sysops.com/wiki/change-powershell-console-syntax-highlighting-colors-of-psreadline/#:~:text=And if you want to replace...