-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathddrive.ps1
25 lines (20 loc) · 1.22 KB
/
ddrive.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
. ".\Set-KnownFolderPath.ps1"
<#
BoxStarter way wasn't working in Win10?
#>
Write-Host "Configuring D:\"
Set-Volume -DriveLetter "D" -NewFileSystemLabel "Data"
$userDataPath = "D:\Data\Documents"
$mediaPath = "D:\Media"
New-Item -ItemType Directory -Force -Path (Join-Path $userDataPath "Pictures") | Out-Null
New-Item -ItemType Directory -Force -Path (Join-Path $userDataPath "Documents") | Out-Null
New-Item -ItemType Directory -Force -Path (Join-Path $userDataPath "Desktop") | Out-Null
New-Item -ItemType Directory -Force -Path (Join-Path $mediaPath "Videos") | Out-Null
New-Item -ItemType Directory -Force -Path (Join-Path $mediaPath "Music") | Out-Null
New-Item -ItemType Directory -Force -Path "D:\Downloads" | Out-Null
Set-KnownFolderPath -KnownFolder 'Pictures' -Path (Join-Path $userDataPath "Pictures")
Set-KnownFolderPath -KnownFolder 'Documents' -Path (Join-Path $userDataPath "Documents")
Set-KnownFolderPath -KnownFolder 'Desktop' -Path (Join-Path $userDataPath "Desktop")
Set-KnownFolderPath -KnownFolder 'Videos' -Path (Join-Path $mediaPath "Videos")
Set-KnownFolderPath -KnownFolder 'Music' -Path (Join-Path $mediaPath "Music")
Set-KnownFolderPath -KnownFolder 'Downloads' -Path "D:\Downloads"