As far as I understand I can use:
WMIC /node:"%computername%" LOGICALDISK GET Name
to get the name and I can use:
WMIC /node:"%computername%" LOGICALDISK GET size
to get the size.
I am have difficulties to get this working using a batch scripting.
As comparing the 1TB size would get difficult with batch, let wmic do the job
WMIC /node:"%computername%" LOGICALDISK where "Name='D:' AND Size>1099511627776" Get Name|findstr "^D:" && (
DISKPART /S filename
) || (
Echo Partition is less than 1TB
)
Otherwise you don't tell about the difficulties you have.