Questions tagged [csv]

Comma Separated Values is a tabular to store data

Comma Separated Values is a tabular to store data in plain text. There is no single CSV format, but in general there are 4 principles:

  • are plain text files (basically, this means numeric, graphical, or other values are expressed using printable characters rather than various-sized groups of bits),
  • consists of records (typically one per line),
  • with the records divided into fields that are separated by delimiters (typically a single reserved character such as comma or TAB, or sometimes any sequence of spaces and tabs),
  • where every record includes exactly the same sequence of fields (this is very occasionally violated).

Source: wikipedia

80 questions
1
vote
2 answers

Task Scheduler -- how to expand /export the "Show Active tasks" window -- Windows server Enterprise Edition 2007:

For the Task Scheduler -- how to expand the "Show Active tasks" window -- This is for Windows server Enterprise Edition (release date: 2007). Is there a way to export the data to a .csv file or something similar?
JosephDoggie
  • 229
  • 2
  • 4
  • 14
1
vote
3 answers

SELECT from inline CSV values in MS SQL

I occasionally get one-off requests to modify some data, and the request comes with some values in CSV. Is there a way I can treat arbitrary CSV as a table or row source quickly and easily, even as inline data? EG, can I do something like: SELECT *…
Chris Wenham
  • 189
  • 1
  • 1
  • 8
1
vote
0 answers

How to import data from CSV file to LDAP directory and keeping them up to date

lets say I have CSV file in format userID;login;firstName;lastName;validUntil Is here any easy way how to import data from this CSV to LDAP directory and how keeping LDAP up to date based on CSV (this CSV is periodically filled from MySQL database…
user1928543
  • 31
  • 1
  • 5
1
vote
3 answers

Get-ADUser in foreach loop returns nothing if using object

$users = Get-Content "C:\PowerShellScript\CSV\swyxusers.csv" $test = Foreach ($user in $users){ Get-ADUser -Filter {Name -like "*$user*" } | Select-Object SamAccountName, Enabled } $test| export-csv -Force -Append…
Jakodns
  • 236
  • 1
  • 6
  • 14
1
vote
1 answer

regexes in sed: matching a character that is not preceded or followed by a specific other character

Assume a wrongly formatted csv snippet using semicolons as field terminator: abc;d" "e"f;"ijk" According to RFC4180 a dquote inside a field should be represented by two dquotes: abc;d"" ""e""f;"ijk" I've tried to achieve this by a sed script that…
1
vote
1 answer

Strange e-mail behavior in powershell

I'm adding a new powershell piece into my user creation, which is to e-mail their supervisor with an alert that they have been created. However, for some reason, it sends the credentials to the next supervisor down in the list, instead of the…
1
vote
2 answers

csv import mysql null

I have to import some csv-formatted data into a mysql (mariadb) database. There is no csv header and the lines look like this: 00323acd-7909-41a4-a849-073ca3391dcf,2014-05,\N 00323acd-7909-41a4-a849-073ca3391dcf,2014-05,1 So they contain some…
NaN
  • 335
  • 1
  • 3
  • 10
1
vote
1 answer

Comparing 2 CSV files in powershell exporting difference to another file

I've write this script out, and could have swore I had it giving me a Failed early this morning but now I'm getting nothing and not sure why. Basically I need to compare $SourceAddress with $OutputAddress and export what is the difference between…
1
vote
1 answer

How to script nagios csv export

nagios 3 can export availability data as csv (clicking through the web gui). Now I would like to do that automated and on a regular basis, so I am looking for a way to set all the parameters (e.g. reporting period) and then get the csv. Since the…
Isaac
  • 1,215
  • 3
  • 26
  • 44
1
vote
1 answer

Optimal setup for bulk CSV import

We're currently running a Wordpress site but need to import 10,000 - 20,000 posts per day from CSV files. Our current setup is an all-in-one LAMP server with 8GB RAM and 8 Virtual Cores. The import speed is quite slow, taking hours and hours. My…
user2028856
  • 113
  • 2
1
vote
1 answer

Powershell - Generate CSV of all locally attched printers on all PC's in a domain

Need a little help finishing off my first Powershell scriptlet... I would like to create a single CSV file of all the XP PC's on my AD domain (approx 3,000) and record all the printers attached. Ultimately I'd like to know how many printers we have…
Guy
  • 2,668
  • 2
  • 20
  • 24
1
vote
1 answer

directory listing export to csv

I'm trying to pull the names of files from a directory into a csv file with the following: Get-ChildItem -name | % { [IO.Path]::GetFileNameWithoutExtension($_) } | Export-Csv users.csv Using '% {…
1
vote
2 answers

Export Active Directory Users, Groups, OUs

a) Can I export all users irrespective of there group memberships to a CSV File, for e.g. users.csv ? b) Can I also export all OUs to a CSV, so I can later re-import them into a New DC on a New Domain ? c) Can I export all Groups to a CSV, so I can…
Mutahir
  • 2,357
  • 2
  • 32
  • 42
1
vote
5 answers

Missing something when adding AD users with powershell

I'm going round in circles and hoping someone can point me in the right direction... I have created a .csv file as follows SamAccountName,Name,GivenName,Surname,DisplayName,Type,Path,Logon…
Fred
  • 11
  • 1
  • 1
  • 2
1
vote
3 answers

Getting Windows EventViewer CSV file from Command-line

EventViewer in Windows has the ability to export a log to a CSV file. I would like to automatically make a backup of that log in that format (as has been done manually in the past few years). It's a standalone system that will typically not have…
User1
  • 2,486
  • 5
  • 20
  • 21