若要将模块路径添加到PSModulePath环境变量值的模块路径,请使用以下命令格式。 此格式使用System.Environment类的SetEnvironmentVariable方法对PSModulePath环境变量进行与会话无关的更改。 PowerShell #Save the current value in the $p variable.$p= [Environment]::GetEnvironmentVariable("PSModulePath")#Add the ne...
若要将模块路径添加到PSModulePath环境变量值的模块路径,请使用以下命令格式。 此格式使用System.Environment类的SetEnvironmentVariable方法对PSModulePath环境变量进行与会话无关的更改。 PowerShell #Save the current value in the $p variable.$p= [Environment]::GetEnvironmentVariable("PSModulePath")#Add the ne...
Update-Module 没有指定参数会更新所有已安装的模块。 若要指定要更新的模块,请使用 Name 参数。 可以使用 RequiredVersion 参数更新到模块的特定版本。如果已安装的模块已是最新版本,则不会更新该模块。 如果在 中 $env:PSModulePath找不到模块,则会显示错误。若要显示已安装的模块,请使用 Get-InstalledModule。
Get-Help Get-History Get-Job Get-Module Get-PSHostProcessInfo Get-PSSession Get-PSSessionCapability Get-PSSessionConfiguration Get-PSSubsystem Import-Module Invoke-Command Invoke-History New-Module New-ModuleManifest New-PSRoleCapabilityFile New-PSSession ...
Gets the status for a file version expiration report generation job for a document library. Get-SPOListVersionPolicy Gets the version policy setting on the document library. Get-SPOMalwareFile Extracts and displays the malware-related information of an infected file stored in SharePoint. Get-SPO...
Gets the status for a file version expiration report generation job for a document library. Get-SPOListVersionPolicy Gets the version policy setting on the document library. Get-SPOMalwareFile Extracts and displays the malware-related information of an infected file stored in SharePoint. Get-SPO...
RuntimeVersion : v2.0.50727 ConsoleHostAssemblyName : Microsoft.PowerShell.ConsoleHost, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, ProcessorArchitecture=msil ConsoleHostModuleName : C:\Windows\System32\WindowsPowerShell\v1.0\Microsoft.PowerShell.ConsoleHost.dll ...
Get-Command Get-ExperimentalFeature Get-Help Get-History Get-Job Get-Module Get-PSHostProcessInfo Get-PSSession Get-PSSessionCapability Get-PSSessionConfiguration Get-PSSubsystem Import-Module Invoke-Command Invoke-History New-Module New-ModuleManifest ...
about_Remote_Requirements about_Remote_Variables Import-Module Export-PSSession Import-PSSession在GitHub 上与我们协作 可以在 GitHub 上找到此内容的源,还可以在其中创建和查看问题和拉取请求。 有关详细信息,请参阅参与者指南。 PowerShell 反馈 PowerShell 是一个开放源代码项目。 选择一个链接以提供反馈...
通过$PSVersionTable 打出PowerShell版本,通过 Get-InstalledModule -name az 和 Get-InstalledModule -name az.* 打印出当前环境的版本号。 经过对比,发现本地VM与Azure Function中Powershell和az 模块的版本都不同. 第二步:寻找临时的解决方案 由于Azure Function中PowerShell的版本从平台级别无法更改(可以修改PS...