Search notes:

System.IO.Directory (class)

GetCurrentDirectory() returns the current directory as a string.

CreateDirectory

CreateDirectory($dir) creates the directory $dir, if it doesn't already exist, and then returns the object that refers to the new or already existing directory.
This method creates all necessary intermediate directories.
PowerShell
$dir = [System.IO.Directory]::CreateDirectory("$env:temp/a/b/c/d/e/f/g/h")
start-sleep 5
$dir = [System.IO.Directory]::CreateDirectory("$env:temp/a/b/c/d/e/f/g/h")
(new-timeSpan $dir.creationTime (get-date)).Seconds
remove-item $env:temp/a -force -recurse

See also

System.IO.DirectoryInfo

Index