Category Archives: Powershell, VBS, VBA and other scripting.

Giving permissions in Exchange for users from a trusted domain.

After a recent consolidation we needed to give users in a seperate (but trusted) domain access to mailboxes on an exchange 2010 server. The below code (copied from https://social.technet.microsoft.com/Forums/exchange/en-US/d2f051f0-9649-4ac0-8e82-9783a34d0eed/how-do-you-grant-full-mailbox-permissions-to-someone-in-a-different-domain-in-exchange-2010?forum=exchange2010 – by J. Duke Rogers Communicore Technologies & Triangle Forensics) does … Continue reading

Posted in Powershell, VBS, VBA and other scripting., System Administration | Comments Off on Giving permissions in Exchange for users from a trusted domain.

get the total number of items in all folders of outlook mailbox store

If you are ever moving large amounts of email around it can be useful to be able to check that there is the correct number of emails in the old and new locations. This code generates a text file that … Continue reading

Posted in Hints and Tips, Powershell, VBS, VBA and other scripting. | Tagged | Comments Off on get the total number of items in all folders of outlook mailbox store

Self Signed Certificates.

Allows you to create longer lasting self signed certificates for testing new-selfsignedcertificate in powershell is pretty good but doesnt allow more than 12 months expiration. selfssl7 allows up to 50 years and 2048 bit size. Its default behavior is to … Continue reading

Posted in Powershell, VBS, VBA and other scripting., System Administration | Comments Off on Self Signed Certificates.

export all mailboxes exchange 2010

To do a bulk mailboxexport on exchange 2010 for all mailboxes, it mus tbe to a share and the share needs appropriate permissions. Filter the get-mailbox to get a subset of the mailboxes. $a=get-mailbox foreach ($u in $a) { $u.alias … Continue reading

Posted in Powershell, VBS, VBA and other scripting., System Administration | Comments Off on export all mailboxes exchange 2010

GetMailboxStatisticsAndEmail.PS1

Script to export a list of all the mailboxes in an organisation and send the results as attachments to an email. Gives a list ordered by size and after that ordered by last logon time (to hilight old inactive mailboxes). … Continue reading

Posted in Powershell, VBS, VBA and other scripting., System Administration | Comments Off on GetMailboxStatisticsAndEmail.PS1

get_programs_installed_local.ps1

export a list of all software installed on this windows computer. writes to a csv file in the “current” folder. # # # $COTSInstalledSoftware = Get-ChildItem HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ | Get-ItemProperty $COTSInstalledSoftware += Get-ChildItem HKCU:\Software\Microsoft\Windows\CurrentVersion\Uninstall\ | Get-ItemProperty IF (Test-path HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\) { $COTSInstalledSoftware … Continue reading

Posted in Powershell, VBS, VBA and other scripting. | Comments Off on get_programs_installed_local.ps1

Powershell to list the rights for each mailbox (who can read others mailboxes)

Just need to put your server name and if you want to not include some of the access rights (ie bes server and backup software etc… just add it to the where clause). Get-Mailbox -server myserver | Get-MailboxPermission | where … Continue reading

Posted in Powershell, VBS, VBA and other scripting. | Tagged , | Comments Off on Powershell to list the rights for each mailbox (who can read others mailboxes)

Powershell to export list of email forwards on an Exchange Server

this will list all the forwards that are active for mailboxes. $fwds = get-mailbox | Where-Object { $_.ForwardingAddress -ne $null } | sort Name | select Name, ForwardingAddress # now get the primary smtp adress of each forward address foreach … Continue reading

Posted in Hints and Tips, Powershell, VBS, VBA and other scripting. | Tagged , | Comments Off on Powershell to export list of email forwards on an Exchange Server