Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
EIT-SWE
Infrastructure
Commits
3b13ea60
Commit
3b13ea60
authored
Jun 19, 2017
by
CRAIG BENNER
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enabling Account that is created in ONEForest Role
parent
399dd7c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
roles/ONEForest/library/ONEForest_Config.ps1
roles/ONEForest/library/ONEForest_Config.ps1
+3
-2
No files found.
roles/ONEForest/library/ONEForest_Config.ps1
View file @
3b13ea60
...
...
@@ -26,8 +26,9 @@ function createUser([String]$inUserName, [String]$inDN, [String]$inPassword)
{
$user
=
Get-ADUser
-filter
{
name
-eq
$inUserName
}
if
(
$user
.
Name
-ne
$inUserName
)
{
$securePassword
=
ConvertTo-SecureString
$inPassword
-AsPlainText
-Force
$securePassword
=
ConvertTo-SecureString
$inPassword
-AsPlainText
-Force
New-ADUser
$inUserName
-Path
$inDN
-AccountPassword
$securePassword
Enable-ADAccount
$inUserName
}
}
...
...
@@ -125,4 +126,4 @@ catch {
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment