first commit

This commit is contained in:
Iwan Clement
2020-11-03 18:55:20 +01:00
commit 1808f43f53
12 changed files with 354 additions and 0 deletions

22
Exercise Files/02_03/02_03.ps1 Executable file
View File

@@ -0,0 +1,22 @@
New-PSRoleCapabilityFile -Path C:\JEA\TechJEARole.psrc
# Create a folder in the local modules path for thismodule
$Srv1ModulePath = Join-Path $env:ProgramFiles "WindowsPowerShell\Modules\LandonHotelJEA"
New-Item -ItemType Directory -Path $Srv1ModulePath
# Create an empty module and manifest.
New-Item -ItemType File -Path (Join-Path $Srv1ModulePath "LHJEATechSupport.psm1")
New-ModuleManifest -Path (Join-Path $Srv1ModulePath "LandonHotelJEA.psd1") -RootModule "LHJEATechSupport.psm1"
# Create the RoleCapabilities folder and copy the PSRC file to it
$RoleCapFolder = Join-Path $Srv1ModulePath "RoleCapabilities"
New-Item -ItemType Directory $RoleCapFolder
Copy-Item -Path C:\Scripts\TechJEARole.psrc -Destination $RoleCapFolder