powershell - Powershell帮助系统使用情况

标签 powershell powershell-3.0

我正在学习Powershell,所以首先我要学习如何使用Powershell的帮助系统。以下是命令“Get-EventLog”的帮助,

  • :位置是什么意思?名为
  • 另外,还有任何链接可以获取有关如何使用帮助系统的更多信息。
    由powershell提供?

    概要
    在本地或远程计算机上的事件日志或事件日志列表中获取事件。
       Syntax   Get-EventLog [-LogName] <String> [[-InstanceId] <Int64[]>] [-After <DateTime>] [-AsBaseObject <SwitchParameter>] [-Before <DateTime>] [-ComputerName <String[]>] [-EntryType <String[]>] [-Index <Int32[]>] [-Message <String>] [-Newest <Int32>] [-Source <String[]>] [-UserName <String[]>] [<CommonParameters>]
    
    Get-EventLog [-AsString <SwitchParameter>] [-ComputerName <String[]>] [-List <SwitchParameter>] [<CommonParameters>]
    
     Parameters
             -After <DateTime>
                    Gets only the events that occur after the specified date and time. Enter a DateTime object, such as the one returned by the Get-Date cmdlet.
                Required?                    false
                Position?                    named
                Default value                
                Accept pipeline input?       false
                Accept wildcard characters?  false
    
            -InstanceId <Int64[]>
                Gets only events with the specified instance IDs.
                Required?                    false
                Position?                    2
                Default value                
                Accept pipeline input?       false
    
                Accept wildcard characters?  false
    
            -LogName <String>
                Specifies the event log.  Enter the log name (the value of the Log property; not the LogDisplayName) of one event log. Wildcard characters are not permitted. This parameter is required.
                Required?                    true
                Position?                    1
                Default value                
                Accept pipeline input?       false
                Accept wildcard characters?  false
    
  • 最佳答案

    对于#1,您需要了解如何在PowerShell中使用位置参数。您可以引用以下有关脚本的文章。

    http://blogs.technet.com/b/heyscriptingguy/archive/2012/04/22/the-problem-with-powershell-positional-parameters.aspx

    对于#2,在PowerShell v3中,有可更新的帮助。默认情况下,在PowerShell 3.0系统上,没有安装帮助。一切都在线。您可以使用Update-HelpSave-Help cmdlet下载帮助内容。

    另外,Get-Help <cmdletname> -Online显示任何cmdlet的在线(最新)内容。

    您可以使用PowerShell中的About主题来学习概念。这些关于主题的信息可以使用help about*访问。您将看到大量的主题,可以使用帮助或Get-Help进行访问。例如,
    help about_Parameters
    再一次,如果您使用的是PowerShell 3.0,则需要先更新帮助才能看到任何帮助内容。

    关于powershell - Powershell帮助系统使用情况,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17085136/

    相关文章:

    java - Windows Powershell 在运行 jboss 7.1.1 时经常挂起

    powershell - PowerShell是否具有类似于Perl abbrev()函数的功能

    c# - 如何在 C# 中使用 PowerShell 的 Invoke-WebRequest

    powershell-3.0 - powershell invoke-webrequest 纯文本文件

    xml - powershell xml 排序节点和 replacechild

    json - 当使用 Add-Member 将对象添加到子项时,如何正确地将 Powershell 对象保留为 JSON?

    以独立于文化的方式进行 Powershell 格式化?!对于数字

    powershell - 如何确定是否已在 Powershell 中调用函数

    linux - 使用powershell区分linux和windows机器

    wmi - 如何将 NOT LIKE 与 Get-WmiObject Win32_Directory -filter 一起使用