0
votes
1answer
9 views

Read command line arguments of same type into array/hash in Powershell

How do I read command line arguments in Powershell into an array? Something like myprogram -file file1 -file file2 -file file3 and then I have an array of [file1,file2,file3] Similar question ...
0
votes
1answer
15 views

PowerShell create array from ForEach and pipe into email body

I am looping through a list of computers and checking disc space. I want to format this information into an array that I can add as the email body. I want the entire output into one email, I know ...
0
votes
1answer
26 views

Excel Reading to Powershell Array

Dear Stackoverflow(ers), I have a small problem with powershell and Excel. I have an excel file with several rows and text in them. I would like to read every column and put the content to an array. ...
-2
votes
1answer
33 views

Powershell array to html

I've three arrays that i would like to write to a HTML page : foreach($arrin $array1){ # create TAb in html file } foreach($ar in $array2){ # create TAb in html file } foreach($a in $array3){ ...
2
votes
1answer
27 views

Dynamically punctuating and grammatically correcting a string via a Foreach loop in PowerShell

I have a simple section in a PowerShell script that goes through each array in a list and grabs the data (found at [3] of the current array), using it to determine if another part of the array (found ...
0
votes
0answers
18 views

Adding users to a group which aren't already member of it Indirect

I'm having trouble with my pscode. Import-Module ActiveDirectory Config $counter = 0 $allready_members = 0 $allready_members_file = "c:\temp\allready_members.txt" $new_members = 0 ...
1
vote
2answers
30 views

Return a PowerShell array value based on the value of another

I have a log file that I am trying parse through but haven't been able to find a solution. I've copied a portion of the log file below. Each group of 3 lines is one error. csrak17 remove int_rpsmkt ...
1
vote
1answer
41 views

Adding element to array in function, but array is still empty

I'm sure it's a silly problem but I can't seem to add element to array in function. PowerShell 2.0 $jobResult = @() function Gather-JobResults { Param ( [Parameter(Mandatory=$true, ...
1
vote
1answer
24 views

Delete content of one array out of an other PowerShell

I have the following to Arrays $a = 1,2,3,4,5 $b = 2,3 now, can i delete the content of $b out of $a so that the output for $a would be: 1,4,5 Thanks in advance Matt
1
vote
3answers
48 views

PowerShell: split out array containing array

I'm sure this is an easy one, but it's got the better of me this afternoon (I'm relatively new to Powershell). Also, I'm fairy sure my code could be more elegant. To start with, I've got some code ...
2
votes
2answers
49 views

Powershell read/update/write parameter file

Part of some text file (pfile.ora) looks like this: fubar.__db_cache_size=1040187392 fubar.__pga_aggregate_target=1291845632 *.audit_file_dest='C:\app\oracle\admin\fubar\adump' ...
0
votes
1answer
33 views

Powershell. Increase value in CSV file or Array

I have a CSV file that looks like: Initials,Size excl. Backup/Pst,Number of warnings USER1,100,1 USER2,100,1 USER4,400,2 I would like to increase the value "Number of warnings" by 1 so I will end ...
0
votes
3answers
57 views

Join two files in powershell

Really need help on this :(I 'll try to be as simple as possible. I got one big file looking like this: ID,Info1,Info2,info3,... On each line, i got one ID and a lot of stuff, comma separated. ...
3
votes
1answer
32 views

PowerShell doesn't return an empty array as an array

Given that this works: $ar = @() $ar -is [Array] True Why doesn't this work? function test { $arr = @() return $arr } $ar = test $ar -is [Array] False That is, why isn't an empty ...
0
votes
2answers
45 views

Remove beginning and end of string for every value in array

I have an array of data that looks like this: Resource file d:\path\relevantDtata\WebConfigResource.resx is missing value for key /configuration/addSettings/add[@key="relevantData"] Resource file ...

15 30 50 per page