-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.ps1
32 lines (24 loc) · 1.07 KB
/
init.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
26
27
28
29
30
31
32
<#
.SYNOPSIS
Gets your computer ready to develop the Carbon.Registry module.
.DESCRIPTION
The init.ps1 script makes the configuraion changes necessary to get your computer ready to develop for the
Carbon.Registry module. It:
.EXAMPLE
.\init.ps1
Demonstrates how to call this script.
#>
[CmdletBinding()]
param(
)
Set-StrictMode -Version 'Latest'
$ErrorActionPreference = 'Stop'
$InformationPreference = 'Continue'
Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath 'PSModules\Carbon' -Resolve) `
-Function @('Install-CGroup', 'Install-CUser')
$user1 = [pscredential]::New('CRegTestUser1', (ConvertTo-SecureString -String 'a1z2b3y4!' -AsPlainText -Force))
$user2 = [pscredential]::New('CRegTestUser2', (ConvertTo-SecureString -String 'a1z2b3y4!' -AsPlainText -Force))
$group1 = 'CRegTestGroup1'
Install-CUser -Credential $user1 -Description 'Carbon.FileSystem test user 1.'
Install-CUser -Credential $user2 -Description 'Carbon.FileSystem test user 2.'
Install-CGroup -Name $script:group1 -Description 'Carbon.FileSystem test group 1.'