Skip to content
SalehRam CLOUD / CODE / LEARNING

Explore the archive

Category: Scripts and Automation

Scripts that are useful and helpful in solving many problems!

Code snippet: AppsScript – Copy files, folders, subfolders in Drive

This is a really quick post for the greater good… I have been looking into a solution to satisfy a customer requirements (really strange ones) about their need to automatically create daily versions of all files on a certain G Suite account they have… The good thing about this is they are all using the […]

Read the story : Code snippet: AppsScript – Copy files, folders, subfolders in Drive

PS: Read and output mailboxes and their sizes

In order to get a list of all (or part) of the mailboxes and view their sizes, simply use the following PS script: Get-mailbox | Get-MailboxStatistics | Sort-Object TotalItemSize -Descending | ft DisplayName, ItemCount, TotalItemSize, Database -auto | Out-File c:\mbx_sizes.txt The above command, will get all the mailboxes, and list their sizes and the database […]

Read the story : PS: Read and output mailboxes and their sizes

PS: Creating bulk mail contacts

Below is a useful script to create bulk contacts in Exchange Management Shell: Import-CSV “C:\NameList.csv” | Foreach{New-MailContact -Name $_.Name -ExternalEmailAddress $_.ExternalAddress} You need to have the following prepared before you use the script: A CSV file contains 2 headers: Name, ExternalAddress, with all the contacts list that you want to create. Save the CSV file […]

Read the story : PS: Creating bulk mail contacts