选项 实例属性(读写) 字符串 通过New-Variable 和Set-Variable cmdlet 分配给变量的选项。 值 实例属性(读写) 对象 在PowerShell 语言或通过 New-Variable 和Set-Variable cmdlet 分配变量时分配给变量的值。 在PowerShell 中,此类型为 System.Management.Automation.PSVar
从PowerShell 7 开始,若要创建区分大小写的哈希表,请在命令中包含CaseSensitive和AsHashtable。 类型:SwitchParameter 别名:AHT Position:Named 默认值:False 必需:False 接受管道输入:False 接受通配符:False -AsString 指示此 cmdlet 将哈希表键转换为字符串。 默认情况下,哈希表键是分组对象的实例。 此参数仅在与...
它會使用 Get-Process Cmdlet 來取得電腦上的程式。 它會使用 Select-Object Cmdlet,輸出 [System.Diagnostics.ProcessModule] 實例的陣列,如 所輸出的每個 Get-Process 屬性所包含。 Cmdlet 的 Select-Object 參數會選取進程名稱。 這會將 ProcessNameNoteProperty 新增至每個 [System.Diagnostics.Proces...
表示此 Cmdlet 會忽略 sqlcmd 腳本變數。當腳本包含許多 INSERT 語句時,這可能包含與變數具有相同格式的字串,例如 $(variable_name)。 展開資料表 類型: SwitchParameter Position: Named 預設值: None 必要: False 接受管線輸入: False 接受萬用字元: False -Encrypt 線上到 SQL Server 時要使用的加密類型。
How do I specify an exclusion list to a Get-ChildItem -File cmdlet? how do i split a line of text with multiple spaces into a fixed number of hash table entries? How do I split a URL? How do I use Out-File and not create headers in my output? How do I use PowerShell to forma...
How do I specify an exclusion list to a Get-ChildItem -File cmdlet? how do i split a line of text with multiple spaces into a fixed number of hash table entries? How do I split a URL? How do I use Out-File and not create headers in my output? How do I use PowerShell to forma...
The idea is that you can copy the output of the command into a script file.Convert-HashtableStringThis function is similar to Import-PowerShellDataFile. But where that command can only process a file, this command will take any hashtable-formatted string and convert it into an actual hash...
A set of PowerShell functions you might use to enhance your own functions and scripts or to facilitate working in the console. Most should work in both Windows PowerShell and PowerShell 7, even cross-platform. Any operating system limitations should be h
The first command type is a cmdlet (pronounced "command-let"), which is similar to the built-in commands in other CLI-based shells. The difference is that cmdlets are implemented by using .NET classes compiled into a dynamic link library (DLL) and loaded into PowerShell at runtime. This...
Data: A hashtable that stores global data. The $mspc context object created by this cmdlet is identical to the $mspc variable available to every script running on the MSPC automation platform. Thus it is recommended to run the Initialize-MSPC_Context cmdlet before testing Runbook scripts loca...