Questions tagged [add-member]
11 questions
3
votes
3 answers
How to specify column position when adding new column to a csv file using PowerShell
How can I specify the column position when adding a new column to an existing csv file?
I want to add the new column as second column (Not at the end what the default is).
The first column is always the same, but the other columns can differ per…

John Doe
- 9,843
- 13
- 42
- 73
2
votes
1 answer
How to make an in-variable change to objects that isn't slow with PSCustomObjects?
I have two tables as pscustomobjects and I tried doing the equivalent of a SQL join to add some properties back into the primary object that I need to read from. The issue is that my code below ran on an object collection for 5 hours with about…

qwe57boz8
- 33
- 5
2
votes
1 answer
mailchimp add member returning status 400 member exists
According to my understanding of mailchimp documentation, if one tries to add a member which already exists, it should return http status of 200, along with a member status of possible values: "subscribed", "unsubscribed", "cleaned", "pending", or…

Peri Hartman
- 19,314
- 18
- 55
- 101
1
vote
2 answers
How can I add child objects to a PsObject?
Is this the correct way to have a PsObject as a Property of a parent PsObject?
This seems somewhat cumbersome to be the correct way and I can't dot source (see pictures at the bottom) the child PsObject's properties either.
$function1.Params |…

Bbb
- 517
- 6
- 27
1
vote
2 answers
How to correctly validate parameter in powershell?
team!
I have variable with type PSObject[] in my advanced function.
[Parameter( Mandatory = $false, Position = 0, HelpMessage = "PsObject data." )]
[PSobject[]] $data,
...
but sometimes my input $data with type [string[]] is transforming to…

Alexey I. Kuzhel
- 126
- 10
1
vote
1 answer
PowerShell Add-Member ... odd behaviour?
Can anyone explain what appears to be odd behaviour when using Add-Member to add an attribute to a PSCustomObject object? For some reason, once you've added the member, the object is represented like a hashtable when displayed, even though it's…

Simon Catlin
- 2,141
- 1
- 13
- 15
0
votes
0 answers
Values passed to PSObject not populating as I would want
I'm aiming to create an array of objects. I query AD and send the results to a function which should create a new object then add this to an array of that type of object. It works but not how I would want in that if I pass variables (1,2,3) then…

FGW
- 1
- 2
0
votes
0 answers
In Powershell, how do I compare two CSV files and merge data for records with a common value?
$files = '\\folder\FixedFQDNList.csv', '\\folder\MergeThisDomain.csv'
$doc2 = Import-Csv $files[1]|select -Property @{label="Indicator";expression=
{$($_."domain")}},@{label="Attribute::Admin Name";expression={$($_."admin contact
…
0
votes
1 answer
Dynamically calculated value for scriptproperty
The script below is a part of a bigger project of converting msgs to pdfs. What I'm having problem with implementing is the attachments custom property. I'd like is for it to take custom value based on calculated value based on msg attachments. The…

Nawad-sama
- 151
- 2
- 12
0
votes
1 answer
Add member to telegram channel
I have been looking for a way to add a number of users to a telegram channel (with users id) for a long time and I didn't find anything. (I'm sure there is such a thing because I know people who do it but IDK and they don't tell me how it is done).

Alireza Saatchi
- 1
- 1
- 1
0
votes
1 answer
Error when creating custom objects in PowerShell
I'm trying to create a custom object but receive error. Does anyone have ideas on how to deal with this issue?
$tempObject = New-Object System.Object
Add-Member -inputobject $tempObject -type NoteProperty -name Name -value ""
Add-Member -inputobject…

andrew_b
- 29
- 1
- 4