new-partition but supress the dialog
hi, want initialize, partition, , format using powershell on windows server 2012.
the following 3 lines works, new-partition step opens dialog "you need format disk in drive g: before can use it" .
i ran powershell window , tried powershell ise, both opened admin privilages.
how can suppress dialog?
maybe issue not powershell rather windows server 2012 environment?
>>>>>>>>>>>>>>>>>>>
initialize-disk -number 2 -partitionstyle mbr -confirm:$false
new-partition -disknumber 2 -usemaximumsize -isactive -driveletter z
get-partition -disknumber 2 -partitionnumber 1 | format-volume -filesystem ntfs -force -confirm:$false
-craig (sql server user education team) // posting provided no warranties, , confers no rights.
hi craig,
i haven't tested this, try piping new-partition cmdlet out-null.
edit: looks out-null suppress console output, not explorer window.
Windows Server > Windows PowerShell
Comments
Post a Comment