New folder in PowerShell 5.1

how do I use PowerShell to create a new folder? Keep in mind that I am not a programmer.

Hello rockerrb,

you can use this cmdlet.

New-Item -ItemType Directory -Name "folder name" -Path "C:\"
1 Like

@rockerrb - A shorter way to do this is to use the mkdir function. Deep in its guts, mkdir still calls the New-Item cmdlet, but is hard coded to create directories (i.e., folders).

mkdir A:\testDir;

The semicolon at the end is my coding preference—it’s optional in PowerShell.

Results

image

tyvm for your reply. After about 3 hours and setting many restore points I got the problem narrowed down:
It had something to do with IO Bit Uninstaller uninstalling Adobe Bridge, which i did have a legal subscription to. IO Bit Unistaller is free unless u want to upgrade to the pro version.

Like I said, took 3 hrs, but i finally got it narrowed down.

Thanks again,
Ryan

1 Like