You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reworked the way that the create user function worked
Removed createSamAccoutName function
Added firstname.lastname to the order of available samAccountNames
Created the following Functions
- createKeyFile
- createPasswordFile
This function is used to create a new user account in AD.
102
-
.PARAMETERName
106
+
.PARAMETERfullUserName
103
107
The full name of the user
108
+
.PARAMETERType
109
+
What type of samAccountName is it, first.last or first inital and last name. You can use initallastname, iln, firstnamelastname, fnln, firstnamedotlastname, fndln, lastnameinitial, lni.
104
110
.PARAMETERTemplate
105
111
Are you using a template account to copy from?
106
112
#>
107
113
108
114
[CmdletBinding()]
109
115
param(
110
-
[Parameter(Mandatory=$TRUE,HelpMessage='What is the full name of the user?')][String()]$fullUserName,
111
-
[Parameter(Mandatory=$FALSE,HelpMessage='Will this be based off a template or no?')][Bool()]$Template
116
+
[Parameter(Mandatory=$TRUE,HelpMessage='What is the full name of the user?')][String]$fullUserName,
117
+
[Parameter(Mandatory=$TRUE,HelpMessage='What type of samAccountName?')][String]$type,
118
+
[Parameter(Mandatory=$FALSE,HelpMessage='Will this be based off a template or no?')][Bool]$Template
112
119
)
113
120
114
-
functioncreatesamAccountName
115
-
{
116
-
#steps to create username for environment
117
-
118
-
<#
119
-
.SYNOPSIS
120
-
function to formulate the samAccountName of an account.
121
-
.DESCRIPTION
122
-
function used to forumulate a samAccountName for the environment.
123
-
.PARAMETERNameInput
124
-
The full name of the user
125
-
.PARAMETERType
126
-
What type of samAccountName is it, first.last or first inital and last name. You can use initallastname, iln, firstnamelastname, fln.
127
-
.PARAMETERPassword
128
-
The password that will be set on account creation
129
-
#>
130
-
131
-
[CmdletBinding()]
132
-
param(
133
-
[Parameter(Mandatory=$TRUE,HelpMessage='What is the name of the person?')][String()]$NameInput,
134
-
[Parameter(Mandatory=$TRUE,HelpMessage='What is the type of samAccountName is it, first.last or first inital and last name?')][String()]$Type,
135
-
[Parameter(Mandatory=$TRUE,HelpMessage='What is the password you would like to set?')][String()]$Password
0 commit comments