Browse by Tags

Tagged Content List
  • Blog Post: Use PowerShell to Create CSV File to Open in Excel

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about exporting a directory list to a CSV file and opening the file in Microsoft Excel with Windows PowerShell. Hey, Scripting Guy! I have a lot of music files that reside in nested folders. I would like to be able to look at the file information...
  • Blog Post: Hey, Scripting Guy! How Can I Convert a Tab-Delimited File to a Comma-Separated Value File?

    Hey, Scripting Guy! I have this tab-delimited file that was produced by a report from an old database application. All it knows how to do is make a tab-delimited file. I hate this format, and our other applications do too. I have been opening the thing in Notepad and trying to find and replace tabs with...
  • Blog Post: Use PowerShell to Work with Any INI File

    Summary : Guest Blogger Oliver Lipkau shares two Windows PowerShell functions to simplify reading and writing to INI files. Microsoft Scripting Guy Ed Wilson here. Today, we have another guest blog post, this one written by Oliver Lipkau. Oliver has written a guest blog post before , and he was...
  • Blog Post: Hey, Scripting Guy! How Can I Read a CSV File?

    Hey, Scripting Guy! I am new to scripting, but I have been tasked with creating a script anyway. What I need to do is to read in a CSV file and then perform an operation on each line in the file. I do not know what the correct cmdlet is or what action I need to use. Can you point me in the right direction...
  • Blog Post: Use PowerShell to Automatically Create a CSV File

    Summary: Learn how to use Windows PowerShell to automatically create a CSV file. Microsoft Scripting Guy Ed Wilson here. I am about finished playing around with CSV files for the time being. I do not always use the ConvertTo-CSV or the Export-CSV cmdlet. There are times that I write code and create...
  • Blog Post: Hey, Scripting Guy! How Can I Use Windows PowerShell to Sort a CSV File?

    Hey, Scripting Guy! have a comma-separated values file that includes several different fields. I’d like to be able to read this file from Windows PowerShell and then sort the information on one (or maybe more) of these fields. However, I can’t seem to get this to work. Any suggestions? -- DW Hey,...
  • Blog Post: Four Easy Ways to Import CSV Files to SQL Server with PowerShell

    Summary : Learn four easy ways to use Windows PowerShell to import CSV files into SQL Server. Microsoft Scripting Guy, Ed Wilson, is here. I was chatting this week with Microsoft PowerShell MVP, Chad Miller, about the series of blogs I recently wrote about using CSV files . He thought a helpful addition...
  • Blog Post: Use a CSV File to Populate Parameters of PowerShell Cmdlets

    Summary: Learn how to use a CSV file to populate parameters of Windows PowerShell cmdlets. Hey, Scripting Guy! I have a problem. I would like to be able to read content from a comma-separated value (CSV) file that contains a list of WMI classes and servers that I would like to query. I need to...
  • Blog Post: Use PowerShell to Remove Duplicate Lines from a CSV File

    Summary: Learn how to use Windows PowerShell to easily remove duplicates from a CSV file. Hey, Scripting Guy! I have a comma-separated value (CSV) file that comes from a Microsoft Excel spreadsheet. We use this CSV file to create new users automatically in Active Directory. The problem is that...
  • Blog Post: Use PowerShell to Append CSV Files Easily

    Summary: Learn how to use Windows PowerShell to easily append one CSV file to another CSV file. Hey, Scripting Guy! I have a problem, and I have searched everywhere on the Internet to find an answer. I need to be able to append one comma separated value (CSV) to another CSV file and create a new...
  • Blog Post: Use PowerShell to Read CSV Files and Create Files and Folders

    Summary: Learn how to use Windows PowerShell to read CSV files and create files and folders. Microsoft Scripting Guy Ed Wilson here. This past week has been fun. I enjoy talking about comma-separated value files (CSV) because they are very flexible, and Windows PowerShell makes working with them...
  • Blog Post: Error Handling and Exporting Active Directory Users to CSV

    Summary: Learn how to handle errors in Windows PowerShell and how to export user information from Microsoft Active Directory to a CSV file. In this post: Exporting Active Directory Users to CSV Adding Comments to a Script File Error Handling in Windows PowerShell Exporting...
  • Blog Post: Remove Unwanted Quotation Marks from CSV Files by Using PowerShell

    Summary: Learn how to remove unwanted quotation marks from a CSV file by using Windows PowerShell. Microsoft Scripting Guy Ed Wilson here. The fall is rapidly falling down here in Charlotte, North Carolina, in the United States. It is cooling off here, and is around 60 degrees Fahrenheit (15.5...
  • Blog Post: Hey, Scripting Guy! How Can I Create Users from a CSV File?

    Hey, Scripting Guy! In your last article, you showed how to create random passwords for users and how to write that password out to a CSV file. You said if anyone asked that you would show how to use that CSV file and create a user from it. Well, here I am, asking you. Show me the script. I'll send chocolate...
  • Blog Post: The 2011 Scripting Games Advanced Event 1: Finding Process Module Versions by Using PowerShell

    Summary : Advanced Event 1 of the 2011 Scripting games entails using Windows PowerShell to find process module versions. About this event Division Advanced Date of Event 4/4/2011 12:15 AM Due Date 4/11/2011 12:15 AM ...
  • Blog Post: Use PowerShell to Sort CSV Files in Order

    Summary : Microsoft Scripting Guy, Ed Wilson, talks about sorting comma-separated value (CSV) files. Microsoft Scripting Guy, Ed Wilson, is here. This morning I am sifting through some of the email that arrives at scripter@microsoft.com . It is always fun to read the email because it gives me a great...
  • Blog Post: Use PowerShell to Add Two Pieces of CSV Data Together

    Summary: Microsoft Scripting Guy, Ed Wilson, talks about adding together two pieces of CSV information and making the rows wider, not longer. Hey, Scripting Guy! I have a problem at work. Our company is in the midst of massive acquisitions and mergers. I mean every few weeks our network completely...
  • Blog Post: Hey, Scripting Guy! Weekend Scripter: Uniquifying and Validating Link Lists with Windows PowerShell

    Microsoft Scripting Guy Ed Wilson here. It is a beautiful Saturday morning here in Charlotte, North Carolina , in the United States. The sky is dark blue and there are few if any clouds visible. It almost makes one dizzy while standing in the front yard leaning back and looking upward because there is...
  • Blog Post: Convert a Semicolon-Delimited File to a CSV File

    Summary: Learn how to convert easily a semicolon delimited file into a CSV file using Windows PowerShell. Hey, Scripting Guy! I have a problem at work, and I hope you can help. We have an application that writes one log file every four hours. These log files are formatted with semicolons, which...
  • Blog Post: Search for and Replace Words in a CSV File by Using PowerShell

    Summary: Learn how to search for and replace words in a CSV file by using Windows PowerShell. Hey, Scripting Guy! I have a comma-separated value (CSV) file that contains user names, user groups, and organizational unit (OU) assignments. The problem is that we are moving one of our office locations...
  • Blog Post: The 2011 Scripting Games Advanced Event 7: Map User's Names and Twitter Names with PowerShell

    Summary : Advanced Event 7 in 2011 Scripting Games uses Windows PowerShell to map user's names to Twitter names. About this event Division Advanced Date of Event 4/12/2011 12:15 AM Due Date 4/19/2011 12:15 AM Event...
  • Blog Post: Export User Names and Proxy Addresses to CSV File

    Summary : Microsoft Scripting Guy Ed Wilson talks about using Windows PowerShell to export user names and proxy addresses to a CSV file from Active Directory. Hey, Scripting Guy! I am trying to produce a report of our users in Active Directory and their associated proxy addresses. I want it in Excel...
  • Blog Post: See Why PowerShell Can't Export Some Properties to CSV

    Summary: Learn why Windows PowerShell cannot export certain properties to a CSV file and what to do about it. Microsoft Scripting Guy, Ed Wilson, is here. The other day, Terry Dow posted a comment on my Use PowerShell to Work with CSV Formatted Text blog post. Basically, Terry is asking about exporting...
  • Blog Post: Easily Remove Columns from a CSV File by Using PowerShell

    Summary: Use a super simple, one-line command to remove columns easily from a CSV file using Windows PowerShell. Hey, Scripting Guy! I have a CSV file from which I need only two of eight columns. Can Windows PowerShell delete certain columns? I have searched the Internet for days with no luck....
  • Blog Post: Use PowerShell to Work with CSV Formatted Text

    Summary : See how to use Windows PowerShell to create CSV files from formatted and unformatted text. Hey, Scripting Guy! I have begun to play around with Windows PowerShell, and it is absolutely the most confusing thing Microsoft has ever created. Simple things are easy. I can use Get-Process and...