Create Folder If It Doesn’t Exist

If (-not(test-path $FolderPath)){
    New-Item -type directory -Path $FolderPath
}
Details
Check if a folder path exists using the Test-Path and if it doesn’t create the folder using New-Item

Example
PS C:\> $FolderPath = "C:\PSScripts"
>> If (-not(test-path $FolderPath)){
>>     New-Item -type directory -Path $FolderPath
>> }