Get-InstalledScript [[-Name] <String[]>] [-MinimumVersion <String>] [-RequiredVersion <String>] [-MaximumVersion <String>] [-AllowPrerelease] [<CommonParameters>]说明Get-InstalledScript cmdlet 获取 CurrentUser 和 AllUsers 范围的已安装脚本。示例...
{Function, DscResource, Cmdlet, Command} PowerShellGetFormatVersion : ReleaseNotes :Required-Script2release notes Dependencies : {} RepositorySourceLocation : http://pattif-dev:8765/api/v2/ Repository : local1 PackageManagementProvider : NuGet InstalledLocation : C:\Users\pattif\Documents\Windows...
As you might expect, theGet-Locationcmdlet returns an object. This might not be a surprise because everything in Windows PowerShell is an object. And just like most other objects, it returns default information. But there is also additional information available. As shown here, when I type...
PS C:\> Push-Location C:\Windows PS C:\Windows>Push-Location System32 PS C:\Windows\System32>Push-Location WindowsPowerShell -StackName Stack2 C:\Windows\System32\WindowsPowerShell>Get-Location -Stack Path --- C:\Windows C:\ C:\Windows\System32\WindowsPowerShell>Get-Location -StackName...
Function Get-SCCMObjectLocation { param( [Parameter(Mandatory=$true, ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true, Position=0)][string]$SMSId, [string]$SiteCode = (Get-CMSite).SiteCode, [string]$SiteServerName = (Get-CMSite).ServerName) ...
Minor -gt 1)) { # 如果操作系统版本大于 Windows Server 2008 R2 或Windows 7,执行以下操作 Write-Host "操作系统版本大于 Windows Server 2008 R2 或 Windows 7" # 在此处添加您要执行的操作 # Create a self-signed certificate to let ssl work $Cert = New-SelfSignedCertificate -CertstoreLocation ...
第一个示例使用Get-HelpPath参数指定 SQL Server 提供程序的路径。 由于指定了提供程序的路径,因此可以从任何路径位置运行命令。 第二个示例使用Set-Location导航到 SQL Server 提供程序的路径。 从该位置开始,无需使用 Path 参数来获取特定于提供程序的帮助Get-Help。
第一個範例會使用 Get-HelpPath 參數來指定 SQL Server 提供者的路徑。因為指定了提供者的路徑,因此您可以從任何路徑位置執行命令。 第二個範例會使用 Set-Location 流覽至 SQL Server 提供者的路徑。 不需要 Get-Help 參數即可從該位置取得提供者特定的說明。 PowerShell 複製 Get-Help Get-Item -Path SQLSE...
Get-Module cmdlet 列出了已导入或可导入到 PowerShell 会话中的 PowerShell 模块。 如果没有参数,Get-Module 获取已导入到当前会话中的模块。 ListAvailable 参数用于列出可从 PSModulePath 环境变量($Env:PSModulePath)中指定的路径导入的模块。
Get-WinEvent 参考 反馈 模块: Microsoft.PowerShell.Diagnostics 获取本地和远程计算机上的事件日志和事件跟踪日志文件中的事件。 语法 PowerShell复制 Get-WinEvent[[-LogName] <String[]>] [-MaxEvents <Int64>] [-ComputerName <String>] [-Credential <PSCredential>] [-FilterXPath <String>] [-Force] [...