I know it is very simple to do :) , but sometime dumb like me don’t know how to do it . Or which Command is used to do it ..
The Command which is used to create a new folder is : New-Item
You can also create a new folder using old mkdir command: Mkdir “Folder Name”
but let’s use PowerShell way to do this.
Open PowerShell Console
To create a new Directory use this command and hit enter:
New-Item -path D:\Demo -Name "Foo" -ItemType Directory
-path: location path where you want to create folder
-Name : Name of the Folder / directory to be Created
-ItemType: it is “directory” to create a folder
and It creates a folder name “Foo” in D:\Demo
what if you want to create a new folder which is already exists?
you will got an error “Directory Name Already exists”
and If you want to create a new folder and that folder already exists and you want overwrite it, try –Force switch parameter with the command.
Hope this is helpful . . .