PowerShell中对函数参数的命名建议

2019-09-30 17:13:15王振洲

    2 RestorePoint
    2 Resolve
    2 Quiet
    2 Query
    2 PSSession
    2 PSHost
    2 ProxyUseDefaultCredent...
    2 Proxy
    2 ProcessorArchitecture
    2 PrependPath
    2 Prefix
    2 PowerShellVersion
    2 OutFile
    2 Off
    2 NotMatch
    2 ModuleInfo
    2 Minimum
    2 Method
    2 MemberName
    2 MaximumReceivedObjectS...
    2 MaximumReceivedDataSiz...
    2 Maximum
    2 LiteralName
    2 ListenerOption
    2 Line
    2 JobName
    2 InFile
    2 Index
    2 IdleTimeoutSec
    2 Headers
    2 Header
    2 Guid
    2 FormatTypeName
    2 FormatsToProcess
    2 First
    2 Expression
    2 EventIdentifier
    2 EntryType
    2 End
    2 Drive
    2 DisplayHint
    2 DisableNameChecking
    2 DisableKeepAlive
    2 Delay
    2 Debugger
    2 Date
    2 Copyright
    2 ContentType
    2 ConfigurationTypeName
    2 CompanyName
    2 CommandName
    2 Column
    2 CimSession
    2 CimResourceUri
    2 CimNamespace
    2 CanonicalName
    2 Before
    2 AutoSize
    2 Author
    2 AsCustomObject
    2 ApplicationBase
    2 AppendPath
    2 AllowClobber
    2 All
    2 Alias
    2 After
    2 AccessMode

好了,看到这个列表,我相信大家对如何设置一个参数名称有了一定的了解了。参照这个列表上的名称,或者就使用这个列表上的名称,让你的cmdlet对更易懂!

关于PowerShell函数的参数应该怎样命名,本文就介绍这么多,希望对您有所帮助,谢谢!