-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathNew-HYDConfigMgrSourceStructure.ps1
More file actions
46 lines (35 loc) · 1.78 KB
/
New-HYDConfigMgrSourceStructure.ps1
File metadata and controls
46 lines (35 loc) · 1.78 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<#
************************************************************************************************************************
Created: 2015-03-01
Version: 1.1
Disclaimer:
This script is provided "AS IS" with no warranties, confers no rights and
is not supported by the authors or DeploymentArtist.
Author - Johan Arwidmark
Twitter: @jarwidmark
Blog : http://deploymentresearch.com
************************************************************************************************************************
#>
# Check for elevation
If (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole(`
[Security.Principal.WindowsBuiltInRole] "Administrator"))
{
Write-Warning "Oupps, you need to run this script from an elevated PowerShell prompt!`nPlease start the PowerShell prompt as an Administrator and re-run the script."
Write-Warning "Aborting script..."
Break
}
$SourcePath = 'E:\Sources'
New-Item -Path $SourcePath -ItemType Directory
New-Item -Path "$SourcePath\OSD" -ItemType Directory
New-Item -Path "$SourcePath\OSD\Boot" -ItemType Directory
New-Item -Path "$SourcePath\OSD\DriverPackages" -ItemType Directory
New-Item -Path "$SourcePath\OSD\DriverSources" -ItemType Directory
New-Item -Path "$SourcePath\OSD\MDT" -ItemType Directory
New-Item -Path "$SourcePath\OSD\OS" -ItemType Directory
New-Item -Path "$SourcePath\OSD\Settings" -ItemType Directory
New-Item -Path "$SourcePath\Software" -ItemType Directory
New-Item -Path "$SourcePath\Software\Adobe" -ItemType Directory
New-Item -Path "$SourcePath\Software\Microsoft" -ItemType Directory
New-Item -Path "$SourcePath\Software\CMClient" -ItemType Directory
New-Item -Path "$SourcePath\Software Updates" -ItemType Directory
New-SmbShare –Name Sources –Path $SourcePath –FullAccess EVERYONE