About 1,180,000 results
Open links in new tab
  1. Creating an array with large initial size in powershell

    Mar 29, 2017 · What's the best way to create an array with large initial size in powershell? Use New-Object in this case: Or, in PSv5+, using the static new() method on the type: These …

  2. 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 …

  3. PowerShell: How to Create an Array with Initial Size

    Jun 19, 2024 · This tutorial explains how to create an array with a specific initial size in PowerShell, including an example.

  4. 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, …

  5. How to Use PowerShell Arrays - Netwrix

    Oct 24, 2023 · In PowerShell, you can also create an array — including an empty array — using the operator @. If you specify @ (), you get an array with no objects at all, you can create an. …

  6. PowerShell Arrays, ArrayLists & Collections: Best Practices

    Oct 29, 2019 · There are many different ways to create arrays with PowerShell. Let’s assume you have a list of names that you need to process somehow as shown below. The most basic way …

  7. Powershell Arrays - PowerShell - SS64.com

    To create a strongly typed array, that can only contain values of one particular type, cast the variable as string [], long [], bool [], int32 [] or any other valid data type.

  8. PowerShell Cookbook - Create an Array or List of Items

    When you want to create a list of a specific type, the Solution demonstrates how to use the System.Collections.Generic.List collection to do that. After the type name, you define the type …

  9. How do I populate an array of unknown length in Powershell?

    Oct 12, 2012 · How do you work with dynamic-length arrays (ArrayLists / Lists) in Powershell? I basically want a 2D-array where the length of the outermost index is unknown. I tried …

  10. How to Create an Empty Array in PowerShell?

    Jan 21, 2024 · To create an empty array in PowerShell, assign an array literal to a variable using $myArray = @(). This command initializes $myArray as an empty array, allowing you to …

  11. Some results have been removed
Refresh