This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ForEach ($User in $Users) { | |
$hash = @{ | |
Name = $User.SamAccountName | |
Title = $User.Title | |
DisplayName = $User.DisplayName | |
GivenName = $User.GivenName | |
Surname = $User.Surname | |
Office = $User.Office | |
Department = $User.Department | |
Division = $User.Division |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.SYNOPSIS | |
Export key attributes for any ADGroup that has data in the proxyaddresses attribute. | |
Does not contain member export/import yet. | |
.EXAMPLE | |
.\Get-ADGroupDetailed.ps1 | Export-Csv .\ADGroupDetailed.csv -notypeinformation -Encoding UTF8 | |
#> | |
$properties = @('Description', 'DisplayName', 'dLMemSubmitPerms', 'dLMemSubmitPermsBL' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set the dynamic parameters' name | |
$ParamName_emaildomain = 'EmailDomain' | |
# Create the collection of attributes | |
$AttributeCollection = New-Object System.Collections.ObjectModel.Collection[System.Attribute] | |
# Create and set the parameters' attributes | |
$ParameterAttribute = New-Object System.Management.Automation.ParameterAttribute | |
$ParameterAttribute.Mandatory = $true | |
$ParameterAttribute.Position = 1 | |
# Add the attributes to the attributes collection |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.EXTERNALHELP PSCloudConnect-help.xml | |
#> | |
function Get-LAConnected { | |
[CmdletBinding(SupportsShouldProcess = $true)] | |
Param | |
( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DynamicParam { | |
# Set the dynamic parameters' name | |
$ParamName_emaildomain = 'EmailDomain' | |
# Create the collection of attributes | |
$AttributeCollection = New-Object System.Collections.ObjectModel.Collection[System.Attribute] | |
# Create and set the parameters' attributes | |
$ParameterAttribute = New-Object System.Management.Automation.ParameterAttribute | |
$ParameterAttribute.Mandatory = $true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DynamicParam { | |
# Set the dynamic parameters' name | |
$ParamName_emaildomain = 'EmailDomain' | |
# Create the collection of attributes | |
$AttributeCollection = New-Object System.Collections.ObjectModel.Collection[System.Attribute] | |
# Create and set the parameters' attributes | |
$ParameterAttribute = New-Object System.Management.Automation.ParameterAttribute | |
$ParameterAttribute.Mandatory = $true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function Copy-ADUser { | |
[CmdletBinding()] | |
Param ( | |
[Parameter(Mandatory = $True)] | |
$Template, | |
[Parameter(Mandatory = $True)] | |
$FirstName, | |
[Parameter(Mandatory = $True)] | |
$LastName, | |
[Parameter(Mandatory = $False)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-SAM ($LastName,$FirstName) | |
{ | |
if (!$Prefix) { | |
$SamAccountName = (($LastName[0..6] -join '') + $FirstName)[0..7] -join '' | |
$SamAccountName | |
$i = 2 | |
#while ((get-aduser -LDAPfilter "(samaccountname=$samaccountname)")) | |
while ($SamAccountName -match "RodriguJ|RodrigJ\d|SmithSa.|WoMe\d$|WoMe$") | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function Sync-ADConnect { | |
Param ( | |
[Parameter(Mandatory = $False)] | |
[switch] $Initial, | |
[Parameter(Mandatory = $False)] | |
$Sleep = 60 | |
) | |
<# | |
.SYNOPSIS | |
Forces Sync of Azure AD Connect (Synchronizes on premises Active Directory with Azure AD/Office 366) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function New-UserToCloud { | |
<# | |
users.csv | |
UserToCopy,FirstName,LastName,P | |
itpizzas,Joe,Hammer,FakePass | |
#> | |
[CmdletBinding()] | |
Param ( | |
[parameter(ValueFromPipelineByPropertyName)] |