member-enumeration Questions

5

Solved

Let's say we have an array of objects $objects. Let's say these objects have a "Name" property. This is what I want to do $results = @() $objects | %{ $results += $_.Name } This works, but c...
Jun asked 3/3, 2011 at 4:55

2

Solved

I am new to powershell scripting. Apologies if I am missing something simple. Let's say I have an object called object that has a field called field. Now let there be a list of these objects. Ho...
Background asked 29/3, 2019 at 18:15

2

Solved

I have an XML file that I would like to parse through, and retrieve back specific information. To make it easy to understand, here is a screenshot of what the XML file looks like: I would like ...
Vevay asked 2/2, 2018 at 22:12

2

The most popular answer for this question involves the following Windows powershell code (edited to fix a bug): $file1 = Get-Content C:\temp\file1.txt $file2 = Get-Content C:\temp\file2.txt $Dif...
Abreu asked 17/6, 2017 at 16:49

2

Solved

I am writing a recursive function that goes through a directory and copies every file and folder in it. The first check I have in the function is to see if the path passed in has children. To find ...
Shainashaine asked 17/5, 2017 at 21:50
1

© 2022 - 2024 — McMap. All rights reserved.