$ageList['Kevin']$ageList['Alex'] 當我想要凱文的年齡時,我用他的名字來存取它。 我們也可以使用此方法,將值新增或更新至哈希表。 這就像使用Add()上述方法一樣。 PowerShell $ageList= @{}$key='Kevin'$value=36$ageList[$key] =$value$ageList['Alex'] =9 ...
查看系统中所有可用的Module get-module-ListAvailable目录: C:\Program Files\WindowsPowerShell\Modules ModuleType Version Name ExportedCommands---Script1.1.1HackSql *忽略中间部分* Manifest2.1.0.0xMySql {Get-ArchitectureName,Get-MySqlExe,Get-ShortVersion, Get... 目录: C:\Windows\system32\WindowsPowerS...
動的パラメーターを検索するには、ユーザーがプロバイダー パスに存在するか、Get-Command コマンドレットの ArgumentList パラメーターを使用するか、Get-HelpのPath パラメーターを使用する必要があります。 関数またはスクリプトの動的パラメーターを作成するには、 dynamic...
If you frequently work with the Command Prompt or PowerShell, you may need to copy files from or to an external drive, and many other times, you may need to display the drives within the console window. In this post, we will show you how you canlist hard drives using Command Prompt o...
Drives Instance property (read-only) Implementation defined (§4.5.2) A collection of drive description objects Name Instance property (read-only) string The name of the provider In PowerShell, this type is System.Management.Automation.ProviderInfo. 4.5.2 Drive description type This type encapsulate...
If you keep pressing Tab, Windows PowerShell will cycle through all the available methods. Essentially, when you do this, Windows PowerShell is showing you what it knows how to do with a String!Here's a tougher task. Read a list of computer names from a file, with one name per line,...
profile as a startup script to customize your environment. You can add commands, aliases, functions, variables, modules, PowerShell drives and more. You can also add other session-specific elements to your profile so they're available in every session without having to import or re-create ...
Discoverability.Users can discover PowerShell's features using cmdlets, such as Get-Command, which creates alist of all the commands-- including cmdlets and functions -- available on a given computer. Parameters can be used to narrow the scope of the search. ...
list-timezones.ps1 Lists all time zones available. More » list-user-groups.ps1 Lists the user groups on the local computer. More » new-power-plan.ps1 Creates a custom power plan based on the active one. More » poweroff.ps1 Halts the local computer (needs admin rights). More »...
Import-Alias Imports an alias list from a file. New-Alias Creates a new alias. Set-Alias Creates or changes an alias (alternate name) for a cmdlet or command element. Get-AuthenticodeSignature Gets information about the Authenticode signature in a file. Set-AuthenticodeSignature Adds an Authentic...