About 58,200,000 results
Open links in new tab
  1. How to Create and Manipulate Lists in PowerShell?

    Jan 9, 2025 · To create a list in PowerShell, you can use the [System.Collections.Generic.List[<type>]] class. Here’s an example of creating a list of strings …

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

  3. Everything you wanted to know about arrays - PowerShell

    Jun 20, 2024 · Here is how you create a List for strings. $mylist = [System.Collections.Generic.List[string]]::new() Or a list for numbers. $mylist = …

  4. Define Powershell variable to have a value of a list

    May 21, 2018 · There are many ways to achieve a simple list/array/table of 3 strings. You can make use of New-Object System.Collections.ArrayList to create a list and use it. eg: Now $list …

  5. PowerShell Arrays, ArrayLists & Collections: Best Practices

    Oct 29, 2019 · There are many ways to create, manipulate, and optimize arrays. In this article you will learn about ArrayLists, Arrays, and Collections as well as some best practices when …

  6. PowerShell ArrayList [Create and Use] - SPGuides

    Dec 6, 2024 · In this tutorial, I explained how to create and use an ArrayList in PowerShell with a few examples. I have also shown how to add element, remove elements, access elements or …

  7. Mastering PowerShell Array List: A Quick Guide

    Jun 14, 2024 · To create an array list in PowerShell, you utilize the `System.Collections.ArrayList` class. Here’s how you do it: $arrayList = New-Object System.Collections.ArrayList

  8. 7. Lists, Arrays, and Hashtables - Windows PowerShell Cookbook, …

    PowerShell makes working with arrays and lists much like working with other data types: you can easily create an array or list and then add or remove elements from it. You can just as easily …

  9. PowerShell list | Methods and examples of PowerShell list

    Mar 10, 2023 · There are two ways to create a list in PowerShell. or. An empty list can be defined as. E.g.: Input: Output: The following are some of the methods available for a list.

  10. Building Arrays and Collections in PowerShell

    Feb 15, 2020 · Let's take a look at some fairly common methods of handling collections of items in PowerShell, shall we? Seems pretty simple and sound, at least at first glance. So… spot …

  11. Some results have been removed
Refresh