-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.ps1
More file actions
25 lines (20 loc) · 730 Bytes
/
setup.ps1
File metadata and controls
25 lines (20 loc) · 730 Bytes
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
<#
.NOTES
Author: Chris Stone <chris.stone@nuwavepartners.com>
Date-Modified: 2020-10-15 17:56:18
#>
Param (
[string]
$ModuleName = (Read-Host -Prompt 'Module Name'),
[System.Management.Automation.PathInfo]
$RootDir = (Get-Location)
)
$Tree = @("Private", "Public", "bin", "lib") + (Get-CIMInstance -Class Win32_OperatingSystem).MUILanguages
# Create directory structure
$ModulePath = New-Item -Path $RootDir.Path -ItemType directory -Name $ModuleName
Foreach ($Dir in $Tree) {
New-Item -Path $ModulePath -ItemType directory -Name $Dir | Out-Null
}
# Module files
New-ModuleManifest -Path ("{0}\{0}.psd1" -f $ModuleName)
New-Item -Path $ModulePath -ItemType directory -Name ("{0}.psm1" -f $ModuleName) | Out-Null