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
Import-Module -Name 'C:\PowerShell\Modules\EWSModule\EWSModule.psm1' | |
###Requires -Modules EWSModule | |
function Get-cDumpMailboxEmail | |
{ | |
[CmdletBinding()] | |
Param( | |
[Parameter(Mandatory = $true, | |
Position = 0)] | |
$OutputPathRoot, | |
[pscredential] |
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
# First you need RSAT tool with Active Directory Powersell Module installed on your local machine | |
# https://docs.microsoft.com/en-us/powershell/module/addsadministration/?view=win10-ps | |
# Get user in AD | |
# https://docs.microsoft.com/en-us/powershell/module/addsadministration/get-aduser?view=win10-ps | |
Get-ADuser [email protected] | |
# Set info for user in AD | |
# https://docs.microsoft.com/en-us/powershell/module/addsadministration/set-aduser?view=win10-ps | |
Get-ADuser [email protected] | Set-ADUser -OfficePhone "555-555-1234" -Manager (Get-ADuser [email protected]) |
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
#Requires -Version 7.0 | |
# If you powershell version is lower than 7. Must update to the latest version. | |
# Install Azure Graph Powershell Module | |
# Run this Command: Install-Module -Name AzureAD | |
# https://docs.microsoft.com/en-us/office365/enterprise/powershell/connect-to-office-365-powershell#connect-with-the-azure-active-directory-powershell-for-graph-module | |
# https://docs.microsoft.com/en-us/office365/enterprise/powershell/manage-user-accounts-and-licenses-with-office-365-powershell | |
$Credential = Get-Credential | |
Connect-AzureAD -Credential $Credential | |
# Tried of input credential every time? You can export credential and import it. |
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
# Create Mailbox via Powershell | |
# https://docs.microsoft.com/en-us/exchange/recipients/create-user-mailboxes?view=exchserver-2019 | |
# https://docs.microsoft.com/en-us/powershell/module/exchange/mailboxes/new-mailbox?view=exchange-ps | |
$defaultPassword = ConvertTo-SecureString -String 'Pa$$word1' -AsPlainText -Force | |
New-Mailbox -Name "Pilar Pinilla" -UserPrincipalName [email protected] -Password -FirstName 'Pilar' -LastName 'Pinilla' -ResetPasswordOnNextLogon $true -OrganizationalUnit "OU=NYC,DC=Contoso,DC=Com" | |
# How to do in Bulk Create via CSV | |
# CSV Header - Name,FirstName,LastName,UserPrincipalName,OU | |
# https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/import-csv?view=powershell-7 |