-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.ps1
35 lines (25 loc) · 1.11 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
33
34
35
<#
.SYNOPSIS
Gets your computer ready to develop the Carbon.FileSystem module.
.DESCRIPTION
The init.ps1 script makes the configuraion changes necessary to get your computer ready to develop for the
Carbon.FileSystem module. It:
.EXAMPLE
.\init.ps1
Demonstrates how to call this script.
#>
[CmdletBinding()]
param(
)
Set-StrictMode -Version 'Latest'
$ErrorActionPreference = 'Stop'
$InformationPreference = 'Continue'
prism install | Format-Table
Import-Module -Name (Join-Path -Path $PSScriptRoot -ChildPath 'PSModules\Carbon' -Resolve) `
-Function @('Install-CGroup', 'Install-CUser')
$user1 = [pscredential]::New('CFSTestUser1', (ConvertTo-SecureString -String 'a1z2b3y4!' -AsPlainText -Force))
$user2 = [pscredential]::New('CFSTestUser2', (ConvertTo-SecureString -String 'a1z2b3y4!' -AsPlainText -Force))
$group1 = 'CFSTestGroup1'
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.'