About 635,000 results
Open links in new tab
  1. Everything you wanted to know about arrays - PowerShell

    Because arrays are such a basic feature of PowerShell, there is a simple syntax for working with them in PowerShell. Create an array. An empty array can be created by using @() PS> $data …

  2. about_Arrays - PowerShell | Microsoft Learn

    Jan 3, 2025 · It isn't easy to delete elements from an array, but you can create a new array that contains only selected elements of an existing array. For example, to create the $t array with …

  3. Everything you wanted to know about hashtables - PowerShell

    A hashtable is a data structure, much like an array, except you store each value (object) using a key. It's a basic key/value store. First, we create an empty hashtable. $ageList = @{} Notice …

  4. Arrays - PowerShell | Microsoft Learn

    Jan 8, 2025 · An array is created via an array creation expression, which has the following forms: unary comma operator ,array-expression , binary comma operator , range operator , or New …

  5. Everything you wanted to know about PSCustomObject - PowerShell

    Jun 20, 2024 · PSCustomObject is a great tool to add into your PowerShell tool belt. Let's start with the basics and work our way into the more advanced features. The idea behind using a …

  6. about_Hash_Tables - PowerShell | Microsoft Learn

    Jan 19, 2025 · Typically, when you create a hashtable you include the key-value pairs in the definition. However, you can add and remove key-value pairs from a hashtable at any time. …

  7. Everything you wanted to know about $null - PowerShell

    Jun 11, 2024 · You can have an array that contains one $null value and its Count is 1. But if you place an empty array inside an array then it's not counted as an item. The count is 0. If you …

  8. about_Functions_Advanced_Parameters - PowerShell | Microsoft …

    Feb 25, 2025 · The AllowEmptyString attribute allows the value of a mandatory parameter to be an empty string (""). The following example declares a ComputerName parameter that can …

  9. about_Variables - PowerShell | Microsoft Learn

    Jan 2, 2025 · You can store any type of object in a variable, including integers, strings, arrays, and hash tables. And, objects that represent processes, services, event logs, and computers. …

  10. about_Assignment_Operators - PowerShell | Microsoft Learn

    Jan 19, 2024 · To delete a particular value from an array, use array notation to assign a value of $null to the particular item. For example, the following statement deletes the second value …