This file contains 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
variable "tags" { | |
type = map(any) | |
default = { | |
env = "dev" | |
owner = "Cloudsquad" | |
Project = "Documentation" | |
} | |
variable "location" { | |
type = string |
This file contains 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
variable "tags" { | |
type = map(any) | |
default = { | |
env = "dev" | |
owner = "Cloudsquad" | |
Project = "Documentation" | |
} | |
variable "location" { | |
type = string | |
default = "eastus2" |
This file contains 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
variable "variable1" { | |
type = "string" | |
default = null | |
} |
This file contains 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
Import-Module ActiveDirectory | |
# Insira o sufixo antigo | |
$oldSuffix = "contoso.corp" | |
# Insira o sufixo novo | |
$newSuffix = "dreamzone.com.br" | |
# Informe o caminho do DC | |
$dc = "DC=contoso,DC=corp" | |
#### Não mude nada a partir daqui #### |
This file contains 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
# Seu arquivo CSV deve conter as colunas Lista, Membros (emails separados por ';') | |
$Objects=Import-Csv C:\temp\objects.csv | |
$Objects | ForEach-Object { | |
$Lista= $_.Lista | |
$Membros = $_.Membros -split ";" | |
IF ($Membros) { | |
ForEach ($Membro in $Membros) { | |
Add-DistributionGroupMember -Identity $Lista -Member $Membro -WhatIf | |
} |
This file contains 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
# Seu arquivo CSV deve conter as colunas Lista, Membros (emails separados por ';') | |
$Objects=Import-Csv C:\temp\objects.csv | |
$Objects | ForEach-Object { | |
$Lista= $_.Lista | |
$Membros = $_.Membros -split ";" | |
IF ($Membros) { | |
ForEach ($Membro in $Membros) { | |
Add-DistributionGroupMember -Identity $Lista -Member $Membro | |
} |
This file contains 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
$group="contabilidade@M365x484652.OnMicrosoft.com" | |
# Seu arquivo CSV deve conter um título chamado "Email" | |
$users=Import-Csv C:\temp\users.csv | |
foreach ($user in $users) | |
{ | |
Add-DistributionGroupMember -Identity $group -Member $user.Email | |
} |
This file contains 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
$listas = Import-Csv C:\temp\listas.csv | |
foreach ($lista in $listas) | |
{ | |
Get-DistributionGroup -Identity $lista.Nome | |
} |
This file contains 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
# Seu Arquivo CSV deve ter as colunas Nome e Email | |
$listas=Import-Csv C:\temp\listas.csv | |
foreach ($lista in $listas) | |
{ | |
New-DistributionGroup -Name $lista.Nome -PrimarySmtpAddress $lista.Email | |
} |
This file contains 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
New-DistributionGroup -Name "Contabilidade" -PrimarySmtpAddress "contabilidade@M365x484652.OnMicrosoft.com" |
NewerOlder