PS> Update-Help-Verbose VERBOSE: Resolving URI: "https://go.microsoft.com/fwlink/?LinkId=717973" VERBOSE: Your connection has been redirected to the following URI: "https://pshelpprod.blob.core.windows.net/cabinets/powershell-5.1/" VERBOSE: Performing the operation "Update-Help" on target "Microsoft.PowerShell.LocalAccounts, Current Version: 5.2.0.0, Available Version: 5.2.0.0, UICulture: en-US". VERBOSE: Microsoft.PowerShell.LocalAccounts: Updated C:\Users\USERNAME\Dokumente\PowerShell\Help\Microsoft.PowerShell.LocalAccounts\1.0.0.0\en-US\Microsoft.Powershell.LocalAccounts.dll-Help.xml. Culture en-US Version 5.2.0.0 VERBOSE: Resolving URI: "https://go.microsoft.com/fwlink/?linkid=2113632" VERBOSE: Your connection has been redirected to the following URI: "https://pshelp.blob.core.windows.net/powershell/help/7.0/Microsoft.PowerShell.Management/" VERBOSE: Performing the operation "Update-Help" on target "Microsoft.PowerShell.Management, Current Version: 7.0.1.0, Available Version: 7.0.1.0, UICulture: en-US". VERBOSE: Microsoft.PowerShell.Management: Updated C:\Users\USERNAME\Dokumente\PowerShell\Help\en-US\Microsoft.PowerShell.Commands.Management.dll-Help.xml. Culture en-US Version 7.0.1.0 ...
要使用下载的本地帮助文件,您可以在想了解的命令后添加 “-?“ 通用参数:
1 2 3 4 5 6 7 8
PS> Get-Process -?
NAME Get-Process
SYNOPSIS Gets the processes that are running on the local computer or a remote computer. ...
# calculate the parent paths that can contain profile scripts $Paths = @{ AllUser_WPS = $pshome CurrentUser_WPS = Join-Path-Path ([Environment]::GetFolderPath('MyDocuments')) -ChildPath"WindowsPowerShell" AllUser_PS = "$env:programfiles\PowerShell\*" CurrentUser_PS = Join-Path-Path ([Environment]::GetFolderPath('MyDocuments')) -ChildPath"PowerShell" }
# check all paths for PowerShell scripts ending on "profile.ps1" $Paths.Keys | ForEach-Object { $key = $_ $path = Join-Path-Path$paths[$key] -ChildPath'*profile.ps1' Get-ChildItem-Path$Path | ForEach-Object { # create a custom object with all relevant details for any # found profile script
# name of PowerShell host is the prefix of profile file name if ($_.Name -like'*_*') { $hostname = $_.Name.Substring(0, $_.Name.Length-12) } else { $hostname = 'any' } [PSCustomObject]@{ # scope and PowerShell version is found in the # name of the parent folder Scope = $key.Split('_')[0] PowerShell = $key.Split('_')[1]
TimeCreated LevelDisplayName Id ProviderName Message
----------- ---------------- -- ------------ -------
04.08.2020 13:03:42 Warning 10016 Microsoft-Windows-DistributedCOM The Anwendungsspezifisch permission settings do...
04.08.2020 13:03:20 Error 1 MTConfig An attempt to configure the input mode of a mul...
04.08.2020 13:03:19 Error 1 MTConfig An attempt to configure the input mode of a mul...
04.08.2020 12:58:18 Error 1 MTConfig An attempt to configure the input mode of a mul...
04.08.2020 11:53:38 Error 10010 Microsoft-Windows-DistributedCOM The server Microsoft.SkypeApp_15.61.100.0_x86__...
04.08.2020 11:23:48 Error 10010 Microsoft-Windows-DistributedCOM The server microsoft.windowscommunicationsapps_...
04.08.2020 11:23:41 Error 10010 Microsoft-Windows-DistributedCOM The server Microsoft.SkypeApp_15.61.100.0_x86__...
04.08.2020 11:23:37 Warning 701 Win32k Power Manager has not requested suppression of ...
04.08.2020 11:23:37 Warning 701 Win32k Power Manager has not requested suppression of ...
04.08.2020 11:23:37 Error 10317 Microsoft-Windows-NDIS Miniport Microsoft Wi-Fi Direct Virtual Adapter...