diskpart output

Posted on 2013-11-22
Last Modified: 2013-12-19
I'm trying to get the 'uniqueid' of my disk via diskpart and get that output to a text file, and i'm running into an issue.  I'm able to use 'diskpart' and view the uniqueid, but when I try to pipe the output to a text file, the file get's created but it's empty.

I'm running this on Win-7 x64;

Here the command I run:
diskpart /s c:\test\disk.txt > diskid.txt

The file disk.txt contains these commands to run in diskpart:
select disk 0
uniqueid disk

diskid.txt get's created, but is empty.

Any help?  Thank you!
Question by:arunykand
  • 4
LVL 51

Accepted Solution

Joe Winograd, EE MVE earned 500 total points
ID: 39669909
If you run an elevated command prompt, it will work:
Accessories>Command Prompt>right-click>Run As Administrator

Regards, Joe
LVL 51

Expert Comment

by:Joe Winograd, EE MVE
ID: 39679045
Hi arunykand,
Have you tried running the command prompt as administrator yet? I'm confident that will solve the problem for you, as I was able to replicate your exact problem here, i.e., the file is empty when the command prompt is run normally, but the file has the correct output when the command prompt is run as administrator (known as an "elevated" command prompt). Regards, Joe
LVL 59

Expert Comment

ID: 39729228
I've requested that this question be deleted for the following reason:

Not enough information to confirm an answer.
Are end users causing IT problems again?

You’ve taken the time to design and update all your end user’s email signatures, only to find out they’re messing up the HTML, changing the font and ruining the imagery. What can you do to prevent this? Find out how you can save your signatures from end users today.

LVL 51

Expert Comment

by:Joe Winograd, EE MVE
ID: 39729229
There is definitely enough information to confirm an answer. I am 100% confident that http:#a39669909 is the answer. The problem is 100% reproducible. The file is empty when the command prompt is run normally, but the file has the correct output when the command prompt is "Run as administrator" (also known as an "elevated" command prompt). I'm certain that anyone reviewing this thread will have the same results. And any EE member with the same problem would be well-served to find this solution. Regards, Joe

Author Closing Comment

ID: 39729296
Yes, this did work....Sorry for the hold-up, fell through the cracks, but certainly appreciate the help!
LVL 51

Expert Comment

by:Joe Winograd, EE MVE
ID: 39729317
OK, great to hear! Thanks for letting us know that it works for you. Regards, Joe

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

The use of stolen credentials is a hot commodity this year allowing threat actors to move laterally within the network in order to avoid breach detection.
This is an article about Leadership and accepting and adapting to new challenges. It focuses mostly on upgrading to Windows 10.
This Micro Tutorial will go in depth within Systems and Security in Windows 7 and will go into detail regarding Action Center, Windows Firewall, System, etc. This will be demonstrated using Windows 7 operating system.
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now