All Questions
Tagged with powershell csv
3,498
questions
0
votes
0
answers
35
views
Why does csv consider data in one column to be an empty string
I have a powershell script, which basically takes an xlsx file with data, converts it to csv and then fills certain cells in another (template) xlsx file with values from certain columns. There are ...
1
vote
1
answer
47
views
How to get list of users from CSV file whose LastSignInDate column has a date that is before 90 days from current date or is empty?
I have the below PowerShell Code which returns the list of my active users along with their LastSignInDate and some of them as blank value in LastSignInDate column.
Like shown below, I want to further ...
0
votes
1
answer
53
views
Powershell - iterate through CSV file
i'm sruggeling with some script that checks NW connectivity between hosts basicaly i have CSV with source IP and port which looks like this
the problem is when i run this script it checks me every ip ...
0
votes
1
answer
64
views
Webscrape table with powershell
My goal is webscrape this page and collect the data in the first table and export as a csv file:
https://www.interactivebrokers.co.uk/en/trading/margin-futures-fops.php
Margin Requirements
Chicago ...
1
vote
1
answer
63
views
How can I obtain the field value in a tab delimited file via PowerShell?
I have a tab delimited file with three fields in each record. I need to obtain the value of the second field so I can parse it to create two new fields at the end of the record. Once I am able to ...
3
votes
3
answers
82
views
Renaming string via key/value matrix
I am attempting to rename strings that have been pulled from a user-defined field. So, I have set up a matrix that creates a relationship between what comes from the UDF and what I want that string to ...
0
votes
2
answers
48
views
Prefix lines of a CSV with a string but after every 99 lines, use another string
This is based on another thread. I didn't want to muddy that one with another question as that one was already solved.
Basically, I got burned by the system into which these CSVs get pulled. I think ...
0
votes
0
answers
19
views
powershell m365 user import doesn't work because of userprincipalname
Please check de picture below. Why it keep giving this error?
enter image description here
I tried different variables:
$_.UserPrincipalName
$UPN
1
vote
2
answers
91
views
Powershell Sort-Object is not sorting a PSCustomObject if explicitly casting the column to [double]
Edit: I've updated the code sample to remove confusing pseudocode and added a few comments in the code.
I apologize for the long code sample. I tried to include pertinent information while cutting ...
0
votes
0
answers
58
views
Using Invoke-sqlcmd occasionally outputs a blank csv file
I'm fairly new to using powershell so bear with me. My goal is to query a database over our network and save the file output of the query as a csv on the local machine. The query works as intended but ...
0
votes
1
answer
35
views
How to get PowerShell to change cell value in CSV
I'm trying to make PowerShell interact with a CSV file and update it's values. There are four columns in the CSV: "Object Name", "Times Flagged", "Date Last Flagged", and ...
0
votes
0
answers
35
views
How to get PowerShell to compare data from CSV
I'm currently working on a script that will take object names from a txt file, compare them to entries in a CSV file, ID which objects from the txt already have entries in the CSV, update existing ...
1
vote
2
answers
52
views
How do I Join Cells from different rows in PowerShell
I am fairly new to PowerShell and just trying to get plug some gaps with my main support role using PowerShell, so far its been great however I am currently stuck on trying to find a solution for the ...
0
votes
0
answers
71
views
All data in one column in CSV file due to formatting of the source file
I receive a CSV file from a colleague that containing sales data. This data I then need to read in to a data table using Powershell.
The format of the file looks like this:
","""&...
0
votes
1
answer
184
views
Az Powershell - not able to read CSV file contents
I am trying to get contents of a backedup CSV users file and compare it with current settings and want to assign (unassigned users). I am accessing this CSV file from file storage - though the file is ...