Friday, March 15, 2013 6:24 PM
I'm having some strange issues with diskpart. I've used it successfully before with the /s option but it's been a while. I've come to use it again and it's just outputting a list of commands.
Diskpart script file is named "file.txt" and contains:
... and nothing else. No line breaks.
From the command line (which starts in C:\users\username\documents) this is what I've tried:
diskpart /s file.txt
(file is in C:\users\username\documents)
copying file.txt to the L: drive.
diskpart /s L:\file.txt
diskpart /s "L:\file.txt"
I only get:
ACTIVE - Mark the selected basic partition as active.
ADD - Add a mirror to a simple volume.
ASSIGN - Assign a drive letter or mount point to the selected volume.
ATTRIBUTES - Manipulate volume or disk attributes.
AUTOMOUNT - Enable and disable automatic mounting of basic volumes.
BREAK - Break a mirror set.
CLEAN - Clear the configuration information, or all information, off the disk.
CONVERT - Convert between different disk formats.
CREATE - Create a volume or partition.
DELETE - Delete an object.
DETAIL - Provide details about an object.
EXIT - Exit DiskPart.
EXTEND - Extend a volume.
FILESYSTEMS - Display current and supported file systems on the volume.
FORMAT - Format the volume or partition.
GPT - Assign attributes to the selected GPT partition.
HELP - Display a list of commands.
IMPORT - Import a disk group.
INACTIVE - Mark the selected basic partition as inactive.
LIST - Display a list of objects.
ONLINE - Online an object that is currently marked as offline.
OFFLINE - Offline an object that is currently marked as online.
RECOVER - Refreshes the state of all disks in the selected pack.
Attempts recovery on disks in the invalid pack, and
resynchronizes mirrored volumes and RAID5 volumes
that have stale plex or parity data.
REM - Does nothing. This is used to comment scripts.
REMOVE - Remove a drive letter or mount point assignment.
REPAIR - Repair a RAID-5 volume with a failed member.
RESCAN - Rescan the computer looking for disks and volumes.
RETAIN - Place a retained partition under a simple volume.
SAN - Display or set the SAN policy for the currently booted OS.
SELECT - Shift the focus to an object.
SETID - Change the partition type.
SHRINK - Reduce the size of the selected volume.
UNIQUEID - Displays or sets the GUID partition table (GPT) identifier or master boot record (MBR) signature of a disk.
Windows Server 2008 x64
DiskPart version 6.0.6002
I'm sure this worked without issue before. Any help appreciated!
Friday, March 15, 2013 6:28 PMI should add that sending this to an output file (e.g. > output.txt) contains the same list of commands.
Friday, March 15, 2013 6:47 PMNevermind. I have found a workaround for calling all queries for diskpart with Invoke-command.
- Marked As Answer by Cheers ZHANGMicrosoft Contingent Staff, Moderator Tuesday, March 26, 2013 2:56 AM