# 导入注册表管理模块 Import-Module Microsoft.PowerShell.Management # 现在可以使用更多的注册表命令和功能 14. 处理注册表中的权限 可以使用 PowerShell 命令来管理注册表项的权限,确保只有授权的用户或组能够访问或修改注册表项。 powershellCopy Code # 获取注册表项的权限 Get-Acl -Path "HKCU:\Software\MyA...
PowerShellKopieren Get-Module[[-Name] <String[]>] [-FullyQualifiedName <ModuleSpecification[]>] [-ListAvailable] [-PSEdition <String>] [-SkipEditionCheck] [-Refresh]-PSSession<PSSession> [<CommonParameters>] PowerShellKopieren Get-Module[[-Name] <String[]>] [-FullyQualifiedName <ModuleSpecifi...
此版本的 PowerShellGet 具有有限的功能,且不支援 PowerShell 資源庫 的更新功能。 若要支援,您必須更新為最新版本。 PowerShellGet 展開資料表 Find-Command Finds PowerShell commands in modules. Find-DscResource Finds Desired State Configuration (DSC) resources. Find-Module Finds modules in a repository...
PowerShell 复制 Update-Module [[-Name] <String[]>] [-RequiredVersion <String>] [-MaximumVersion <String>] [-Credential <PSCredential>] [-Scope <String>] [-Proxy <Uri>] [-ProxyCredential <PSCredential>] [-Force] [-AllowPrerelease] [-AcceptLicense] [-PassThru] [-WhatIf] [-Confirm] ...
powershellCopy Code # 获取一个已存在的分区(这里选择第一个磁盘上的第一个分区,可以根据实际情况调整) $partition = Get-Partition -DiskNumber 1 -PartitionNumber 1 # 挂载分区到一个空闲驱动器号 Add-PartitionAccessPath -Partition $partition -AssignDriveLetter # 卸载分区(移除驱动器号) Remove-PartitionAc...
cmdlet Publish-Module 使用API 密钥将模块发布到基于 NuGet 的联机库,该密钥作为用户个人资料的一部分存储在库中。 可根据模块的名称或包含模块的文件夹路径指定要发布的模块。这是Microsoft.PowerShell.PSResourceGet 中cmdlet 的代理 Publish-PSResource cmdlet。 有关详细信息,请参阅 Publish-PSResource。
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. ...
在PowerShell 3.0 和 PowerShell 4.0 中,除非将模块导入当前会话,否则Get-Help无法在模块中找到 About 文章。 若要获取模块中的 About 文章,请使用cmdlet 或运行该模块中包含的 cmdlet 导入该模块Import-Module。 从PSReadLinev2.2.2 开始,该模块附带了两个函数,可在命令行上键入命令时快速访问帮助。 帮助显示在...
Microsoft.PowerShell.Core 列出当前会话中导入的模块,或者可从 PSModulePath 导入的模块。 语法 PowerShell Get-Module[[-Name] <String[]>] [-FullyQualifiedName <ModuleSpecification[]>] [-All] [<CommonParameters>] PowerShell Get-Module[[-Name] <String[]>] [-FullyQualifiedName <ModuleSpecification[...
Module: Microsoft.PowerShell.Management Gets information about the current working location or a location stack. Syntax PowerShellCopy Get-Location[-PSProvider <String[]>] [-PSDrive <String[]>] [<CommonParameters>] PowerShellCopy Get-Location[-Stack] [-StackName <String[]>] [<CommonParameters...