Powershell NoTypeInformation: Applications and Examples

-

|

Powershell NoTypeInformation: Why So Much Interest?

I chose to write on ‘Powershell -NoTypeInformation’ because so many people ask questions about it. In preparing to write on this topic, I was wondering why there is such a huge interest in ‘Powershell -NoTypeInformation’? 

The only answer I could come up with is because of its application in PowerShell reporting. A lot of people may have had the same concern I had some time ago when I ran a PowerShell report with the Export-Csv cmdlet. When you run the Export-Csv PowerShell command it leaves some funny info on top of the csv file as shown below:

What is ‘Powershell -NoTypeInformation’?

Good question! ‘Powershell -NoTypeInformation’ -actually the ‘NoTypeInformation’ bit is a PowerShell parameter found in some PowerShell commands. If you are new to PowerShell and want to know more about PowerShell command parameters, see the article – 18 Most Useful Powershell Commands for Windows Admins

Most people searching for ‘Powershell -NoTypeInformation’ probably ran into trouble when they ran Export-Csv and want to know how to get rid of the annoying ‘TypeInformation’ left on top of the csv report. 

Apart from Export-Csv cmdlet, there are some other PowerShell commands (cmdlets) that have the ‘NoTypeInformation’ parameter. To find all PowerShell commands that have the ‘NoTypeInformation’ parameter, execute the command below:

Get-Command -ParameterName 'NoTypeInformation'  

The above command will produce the result shown below. As you see from the figure, three PowerShell cmdlets have the ‘PowerShell NoTypeInformation’ parameter: ConvertTo-Csv, ConvertTo-Xml and Export-Csv. Depending on the cmdlets on your computer, you may have more.

Get-Command -ParameterName ‘NoTypeInformation’

NoTypeInformation Applications

For the remaining part of this article, I will focus on Export-Csv cmdlet.
To get information about any PowerShell command, you require the Get-Command cmdlet. To get more information about the Export-Csv cmdlet, execute the command below:

 Get-Help Export-Csv 

The result of the command is shown below:

powershell-notypeinformation-2
Get-Help Export-Csv

The result of the previous command will outline the basic help information about the Export-Csv cmdlet.

To get more information about the cmdlet; including information about the ‘NoTypeInformation’ parameter, execute the command:

 Get-Help Export-Csv -Full 

If you wish to return examples (how to use Export-Csv cmdlet), execute the command:

 Get-Help Export-Csv -Examples 

NoTypeInformation Examples

Lets look at some practical examples ‘PowerShell -NoTypeInformation’. Say you want to get the list of all processes running on your computer, you could run the command below:

Get-Process | Select-Object ID, ProcessName | Export-Csv E:\Powershell-NoTypeInformation.csv 
Replace the path E:\Powershell-NoTypeInformation.csv with a valid path

The previous command will create a csv file containing our process report. Portion of my report is shown in below:

powershell-notypeinformation-3

Notice that the csv header has some information you did not request for? – “#TYPE Selected.System.Diagnostics.Process” This is the Process TypeInfirmation. It is dropped there by the Get-Process command by default. Want proof? Enter the command below:

Get-Process | Get-Member 

The result of the command is shown below:

powershell-notypeinformation-4
Get-Process | Get-Member

Notice the “TypeName: System.Diagnostics.Process” right on top? This is where the TypeInformation on your csv report came from!

Getting rid of that unwanted information is where the ‘Powershell -NoTypeInformation’ comes in. Let’s repeat the previous command but now including the -NoTypeInformation parameter:

Get-Process | Select-Object ID, ProcessName | Export-Csv E:\Powershell-NoTypeInformation-1.csv -NoTypeInformation 

Notice that the TypeInformation is gone? See Figure below for details.

powershell-notypeinformation-5

This is the power of ‘PowerShell -NoTypeInformation’!

I hope this has been helpful. Kindly leave comments below with your feedback.

Other Helpful Guides

Additional Resources and References

  • Was this post Helpful?
  • YesNo

LEAVE A REPLY

Please enter your comment!
Please enter your name here

ADVERTISEMENTS

FEATURED POSTS

Best Christian Movies on Netflix

The 10 Best Christian Movies on Netflix

This Itechguide reviews the 10 best christian movies on Netflix. The movies are listed in reverse order – with the 10th movie...
How to Change Orientation in Google Docs

How to Change Orientation in Google Docs

This Itechguide teaches you how to change orientation in Google Docs. The guide covers steps to change orientation in Google Docs from...
How to Delete Google Photos

How to Delete Google Photos

This Itechguide teaches you how to delete Google Photos. The guide offers steps to delete Google Photos from the Google Photos App...
How to Install Windows 10 1909 Update Manually

How to Install Windows 10 1909 Update Manually

This Itechguide teaches you how to install Windows 10 1909 update manually. Windows 10 1909 (otherwise known as Windows 10 November update)...
How to Create a Poll on Facebook

How to Create a Poll on Facebook

This Itechguide teaches you how to create a poll on Facebook. You can create a poll on Facebook from a Facebook page...

AMAZON DEALS

TRENDING POSTS

Remote Desktop Connection

Remote Desktop Connection an Internal Error Has Occurred [Fixed]

Introduction I recently received the error message "Remote Desktop Connection an Internal Error Has Occurred". It was strange because...

Find My Samsung: Register and Use Samsung Find my Mobile

Introduction Ever wondered how you could find your Samsung phone if you lost it? Find my Samsung or Samsung...
What is the Difference Between PowerShell and CMD?

Windows Powershell vs CMD: Differences and Similarities

Introduction This short guide compares Windows PowerShell vs CMD (Windows command prompt). I will cover the history and nature...
Spotify No Longer Supports this Version of Microsoft Edge

Spotify No Longer Supports this Version of Microsoft Edge [Fixed]

Introduction When you open Spotify web player on Microsoft Edge, you may receive the error message "Spotify No Longer...
Windows 10 Won't Boot

Windows 10 Won’t Boot With Black Screen? 3 Ways to Fix It

Why Won't Windows 10 Boot Up? If your Windows 10 stops with a black screen, the first question in...

ADVERTISEMENTS

BEST OF ITECHGUIDES

Best Action Movies onNetflix

The 10 Best Action Movies on Netflix

There are quite a number of action movies on Netflix. It is definitely not all that will give you that desired experience.
Powershell Function

PowerShell Function: Syntax, Parameters, Examples

Introduction There are two types of PowerShell Functions, basic and advanced. A basic PowerShell Function is a list of...
How to Dual Boot Ubuntu and Windows 10

How to Dual Boot Ubuntu and Windows 10

Introduction This is a step by step guide to dual boot Ubuntu and Windows 10 on the same computer....

Routing and Remote Access in Windows Server 2016 (Part 4): Configure Web Application proxy

Introduction This is part 4 of a 4-part "Routing and Remote Access" series. This part covers how to configure...
Best Zombie Movies on Netflix

Our 10 Best Zombie Movies on Netflix

This Itechguide reviews the 10 best zombie movies on Netflix. Furthermore, the movies are listed in reverse order – with the 10th...

RECENT POSTS

How to Change Facebook Page Name

How to Change Facebook Page Name

This Itechguide teaches you how to change Facebook page name. The guide covers steps to change Facebook page name from a PC...
How to Change YouTube Channel Name

How to Change YouTube Channel Name

This Itechguide teaches you how to change YouTube channel name. The guide covers steps to change YouTube channel name from a PC.
How to Bold Text on Facebook Post

How to Bold Text on Facebook Post

This Itechguide teaches you how to bold text on Facebook post. The guide covers steps to bold text on Facebook post from...
Best Crime Documentaries on Netflix

The 10 Best Crime Documentaries on Netflix

This Itechguide reviews the 10 best crime documentaries on Netflix. The documentaries are listed in reverse order – with the 10th documentary...
Best Netflix Series

The 10 Best Netflix Series

This Itechguide reviews the 10 best Netflix series. The series are listed in reverse order – with the 10th series on top....

AMAZON DEALS

MUST READ

excel document not saved

How to Fix “Document not Saved” Error in Excel

Excel "Document not Saved" Error may be caused by one of the following: Attempting to save a shared...
How to Freeze a Row in Google Sheets

How to Freeze a Row in Google Sheets

This Itechguide teaches you how to freeze a row in Google Sheets. The guide offers steps to freeze a row in Google...
How-to-Make-Facebook-Page-Private

How to Make Facebook Page Private (from Facebook App or PC)

Introduction This guide demos how to make Facebook page private. Facebook is a public platform - meaning that anybody...
Best Horror Movies on Netflix:

The 10 Best Horror Movies Now on Netflix

There are a lot of horror movies on Netflix. Unfortunately, not all of them will exceed your expectations.
Best Korean Dramas on Netflix

The 10 Best Korean Dramas on Netflix

This article provides you a review of the best Korean dramas on Netflix. The Korean dramas on this list are exceptional dramas...

AMAZON DEALS

By using this website you agree to accept our Privacy Policy and Terms & Conditions