Category: Powershell
When migrating mailboxes to O365 exchange online, maximum item size is limited to 150 MB. To move these items, you can export these to pst -file and you can import these back after mailbox is migrated. With this script to find users / mailboxes…
Hi again, Below script will add Reviewer permissons for DefaultCalendarShare group. This is needed for Hybrid environments and Cross-Premises calendar sharing. $allmailbox = Get-Mailbox -Resultsize Unlimited | where { $_.IsShared -eq $False -and $_.ArbitrationMailbox -eq $Null } $Logfile = “C:TempLogsadd-calendarPerm.log”…
Below is a script that will export calendar permissions to utf8-formatted csv-file. Works with Onpremise Exchange as well as Exchange Online.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
$col = @() $mbxs = get-mailbox -Resultsize unlimited foreach ($mbx in $mbxs) { $mbx $calendarName = Get-MailboxFolderStatistics $mbx.userprincipalname | where-object { $_.FolderType -eq "Calendar" } | select-Object Name $mailboxCalPermissions = get-MailboxFolderPermission ("{0}`:{1}" -f ($mbx.userprincipalname).toString(),$calendarName.Name)|select-object @{Name="PrimaryMailBox";Expression={$mbx.userprincipalname}}, FolderName,User,AccessRights|where-object { $_.AccessRights -ne {None}} $col += $mailboxCalPermissions } $col $col | export-csv -nti -enc utf8 c:\temp\calendarPERM.csv |
Hi, Add all users that need the following rights to a Mail Enabled Security Group. Then add permissions to calendars with this script: $allmailbox = Get-Mailbox -Resultsize Unlimited -Filter {RecipientTypeDetails -eq ‘usermailbox’} Foreach ($Mailbox in $allmailbox) { $path =…
Hi, Powershell is the way. Open powershell and type: import-module activedirectory Then. $strSID=”Enter SID Here” $uSid = [ADSI]”LDAP://<SID=$strSID>” echo $uSid Have a nice one,
Dou, that was a long sentence 🙂 But here is how. $computers = get-adcomputer -ldapfilter “(name=name*)” $computers | foreach {Add-ADGroupMember -id name_of_the_group -MEMBERS $computers.samaccountname} Happy powershelling!
Hi, Today I had to get a list from Office 365 with UserPrincipalName and MsolAccountSku. So here is the trick-script. $ReportPath = “c:userlist.csv” Add-Content -value (“UserPrincipalName”+”,”+”IsLicensed”+”,”+ “Licenses”) -Path $ReportPath $AllUsers = Get-MsolUser -All foreach ($User in $AllUsers) { $UserPrincipalName =…
Yesterday I had to add all licensed users to a Mail Enabled Security Group and then add that group to Room, Equipment and user mailboxes with desired permissions. To add all Licensed users to a group: $users = Get-MsolUser |…
I think this was easier with Dirsync, but that product is history. Open Powershell as Administrator and modify this Powershell script: $Local = “Domain.local” $Remote = “tenant.onmicrosoft.com – AAD” #Import Azure Directory Sync Module to Powershell Import-Module AdSync $OnPremConnector =…
Here is a handy script to remove obsolete proxyaddresses from all mailboxes. foreach($i in Get-Mailbox -ResultSize Unlimited) { $i.EmailAddresses | ?{$_.AddressString -like ‘*@domain.com’} | %{ Set-Mailbox $i -EmailAddresses @{remove=$_} } } Just replace the domain.com with…