Saturday 14 June 2014

Use of Diskpart utility in SCCM task sequence during OS deployment

Use of Diskpart utility in SCCM task sequence during OS deployment
·         Diskpart utility use to create and delete the partition on HDD.Some time machine doesn’t allow to create partition due to corruption of boot record on HDD.This case we can use Diskpart  utility.
·         We can use same utility in SCCM task sequence during OS deployment where we can delete all partitions already available on HDD
·         Some cases in baremetal scenario we need to delete existing partition, such cases we can create script. This script will be helpful in deleting partitions.
·         We can use “clean “command line to delete all existing partition.
·         So following commands can be added into the script.
Disk 0
Clean
·         Copy above commands in notepad and save it as diskpart01.txt, and then we have to create packages in sccm. Do not create program for this package. Then distribute this package on distribution.



·         The first step in my task sequence is a “Run Command Line”. Then select the package that contains a text file called diskpart01.txt.
·         In command line box type following command:-
diskpart /s diskpart01.txt
           
·         Keep Diskpart task before the”Format and Partition Disk” task in the task sequence.
        We can also use below script to delete existing partition on machine:-
Select disk 0
select partition 2
delete partition
select partition 3
delete partition

·         Use same above process to create package and to create task sequence steps

1 comment:

  1. You need the command select disk 0 and then clean.. On a Windows 2012R2 installation...

    ReplyDelete