I have run this command based on Veracrypt documentation:
"VeraCrypt Format.exe" /create "\Device\HardDisk2\Partition2" /size 2G /encryption AES /hash SHA-512 /filesystem FAT /password "my_password"
I got this error - "in VeraCrypt windows command line, only container files can be created through the command line."
This means VeraCrypt can create encrypted container files via the command line but cannot create encrypted partitions directly through the command line interface.