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

    Jun 20, 2024 · An array is a data structure that serves as a collection of multiple items. You can iterate over the array or access individual items using an index. The array is created as a …

  2. How can I pull an array index value to a variable in powershell ...

    Jul 24, 2019 · I am wanting to pull the value of an array index element into another seperate value so that I can display the value to verify that was the correct choice from the user.

  3. How to Use PowerShell Array - Complete Guide - LazyAdmin

    Jan 19, 2023 · The easiest and most straightforward way to create an array in PowerShell is to assign multiple items to a single variable. For example, if we want to create an array of fruits, …

  4. PowerShell Arrays: Creating, Indexing, and Iterating

    Arrays are collections of related items, such as a list of numbers or names, that are stored in a variable. By using arrays, you can store and manipulate large amounts of data in your scripts. …

  5. Arrays in PowerShell – Create, change, read, sort, delete

    Sep 29, 2014 · Like any other scripting language, PowerShell supports the array data type. Its purpose is to combine values in a variable where you can access elements through an index. …

  6. How-to: Create and use PowerShell Arrays - SS64 Command line …

    To retrieve an element, specify its number, PowerShell automatically numbers the array elements starting at 0. So for example, this array: Will have the automatic index numbers: Think of the …

  7. powershell - Use variables to access array cells? - Super User

    Nov 22, 2020 · To get an array of characters, you want to use casting: PS C:\> [Char[]]'035241' 0 3 5 2 4 1 But when we try to use these as indices into an array, casting as [Int] returns the …

  8. Mastering PowerShell Arrays: A Beginner’s Guide!

    Dec 25, 2020 · To modify an element in an array, you can use the array index to access the element and assign it a new value. For example: This will modify the element at index 2 in the …

  9. PowerShell Array Tutorials - PowerShell FAQs

    Each item in a PowerShell array is assigned an index number, starting at 0 for the first element. You can access an array element by specifying its index inside square brackets: $thirdItem = …

  10. PowerShell array/index/variable - Stack Overflow

    Feb 21, 2019 · Using the index operator on that string gives you the characters from the specified indexes of that string. Can't you just say $test = $array? Then $test [0] will grab the first array. …

Refresh