PoshCode Archive  Artifact [8a311b56d6]

Artifact 8a311b56d63de0dd1b0520eec3a98da6e37054a104d1e3bdede680e7c7dfe079:

  • File Check-e-mail-access-type.ps1 — part of check-in [e0c0ea4e6b] at 2018-06-10 13:33:04 on branch trunk — Want to know what type of access a user has to Exchange server? (user: Osnilton K M size: 777)

# encoding: ascii
# api: powershell
# title: Check e-mail access type
# description: Want to know what type of access a user has to Exchange server?
# version: 0.1
# type: script
# author: Osnilton K M
# license: CC0
# x-poshcode-id: 3924
# x-archived: 2013-02-04T05:01:49
# x-published: 2013-01-31T10:17:00
#
# Whether Outlook Web App or Active Sync access?
# Check this script out.
#
$ErrorActionPreference = "silentlycontinue"

$login = read-host -prompt "Type the user login"

$Status = @( Get-ADuser $login | select SamAccountName).count 

If($Status -eq 0) {

Write-Host No such user exists! -FOREGROUNDCOLOR RED

./the_script_name.ps1

} Else {Write-Host Working on it! -FOREGROUNDCOLOR GREEN

 
}


Get-Mailbox $login | Get-CASMailbox