Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Function Do-Stuff{
- <#
- .SYNOPSIS
- Describe the function here
- .DESCRIPTION
- Describe the function in more detail
- .EXAMPLE
- Give an example of how to use it
- .EXAMPLE
- Give another example of how to use it
- .PARAMETER NewHireFirstName
- First name of new hire
- .PARAMETER NewHireLastName
- Last name of new hire
- .PARAMETER ManagerName
- Name of Manager
- .PARAMETER CopyUserFirstName
- First name of user to copy security groups and OU from
- .PARAMETER CopyUserLastName
- Last name of user to copy security groups and OU from
- .PARAMETER EmailRequired
- Switch that denotes whether an email address is required or not.
- .PARAMETER UsageLocation
- Country in which the user will be accessing email from primarily
- .PARAMETER LicenseType
- The type of license to assign in Office 365
- #>
- [CmdletBinding(SupportsShouldProcess=$True,ConfirmImpact='Medium')]
- param
- (
- [Parameter(ParameterSetName = "Default",Mandatory=$True,ValueFromPipeline=$True,ValueFromPipelineByPropertyName=$True,HelpMessage='Please Enter the first name of the new hire')]
- [Parameter(ParameterSetName = "EmailRequired",Mandatory=$True,ValueFromPipeline=$True,ValueFromPipelineByPropertyName=$True,HelpMessage='Please Enter the first name of the new hire')]
- [Alias('FirstName')]
- [string[]]$NewHireFirstName,
- [Parameter(ParameterSetName = "Default",Mandatory=$True,ValueFromPipeline=$True,ValueFromPipelineByPropertyName=$True,HelpMessage='Please Enter the last name of the new hire')]
- [Parameter(ParameterSetName = "EmailRequired",Mandatory=$True,ValueFromPipeline=$True,ValueFromPipelineByPropertyName=$True,HelpMessage='Please Enter the last name of the new hire')]
- [Alias('LastnameName')]
- [string[]]$NewHireLastName,
- [Parameter(ParameterSetName = "Default",Mandatory=$False,ValueFromPipeline=$True,ValueFromPipelineByPropertyName=$True,HelpMessage='Please Enter the managers name.')]
- [Parameter(ParameterSetName = "EmailRequired",Mandatory=$False,ValueFromPipeline=$True,ValueFromPipelineByPropertyName=$True,HelpMessage='Please Enter the managers name.')]
- [Alias('Manager')]
- [string[]]$ManagerName,
- [Parameter(ParameterSetName = "Default",Mandatory=$False,ValueFromPipeline=$True,ValueFromPipelineByPropertyName=$True,HelpMessage='Please Enter the first name of the user to copy security groups from.')]
- [Parameter(ParameterSetName = "EmailRequired",Mandatory=$False,ValueFromPipeline=$True,ValueFromPipelineByPropertyName=$True,HelpMessage='Please Enter the first name of the user to copy security groups from.')]
- [Alias('CUFirstName')]
- [string[]]$CopyUserFirstName,
- [Parameter(ParameterSetName = "Default",Mandatory=$False,ValueFromPipeline=$True,ValueFromPipelineByPropertyName=$True,HelpMessage='Please Enter the last name of the user to copy security groups from.')]
- [Parameter(ParameterSetName = "EmailRequired",Mandatory=$False,ValueFromPipeline=$True,ValueFromPipelineByPropertyName=$True,HelpMessage='Please Enter the last name of the user to copy security groups from.')]
- [Alias('CULastName')]
- [string[]]$CopyUserLastName,
- [Parameter(ParameterSetName = "EmailRequired",Mandatory=$True,)]
- [Switch]$EmailRequired,
- [Parameter(ParameterSetName = "EmailRequired",Mandatory=$True,ValueFromPipeline=$True,ValueFromPipelineByPropertyName=$True,HelpMessage='Please enter CA for Canada, US for United States or CN for China')]
- [Alias('Location')]
- [ValidateSet("CA","US","CN")]
- [string]$UsageLocation,
- [Parameter(ParameterSetName = "EmailRequired",Mandatory=$True,ValueFromPipeline=$True,ValueFromPipelineByPropertyName=$True,HelpMessage='Please enter Standard for Enterprise')]
- [Alias('License')]
- [ValidateSet("Standard","Enterprise")]
- [string]$LicenseType
- )
- begin {
- write-verbose ""
- }
- process {
- write-verbose "Beginning process loop"
- foreach ($thing in $things) {
- Write-Verbose "Processing $thing"
- if ($pscmdlet.ShouldProcess($thing)) {
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment