Showing posts with label powershell. Show all posts
Showing posts with label powershell. Show all posts

21 December 2019

Powershell script: Outlook To Exchange connection test

Outlook can lose connection with Exchange for various reasons and even if it happened once, it still can impact the business. To help administrators identify the core of an issue I wrote this Powershell script.
The script is designed for Outlook 2013-2019 clients that connected to Exchange 2016-2019 by "MAPI over HTTP" protocol.
Before start the script change two variables:
$Exchange = "exchange.test.local"
$SMTPDomain = "test.local"
The result is presented as an HTML page.

11 July 2019

Test your connection to BlackBerry NOC/Cloud Servers

The BlackBerry UEM system administrator (BlackBerry Proxy & Control) periodically faced with situations when part or all of the BlackBerry Work clients cannot connect to their mailboxes / calendars. The reason may be on BlackBerry servers, an ISP or in home WiFi router.
To identify issues on the client side, I decided to write a PowerShell script that checks the availability of the main components that necessary for BlackBerry Work.

The script has several settings that determine which types of servers need to be checked. You can also change the server list.

The list of settings:
$country = "us"                                                            # <<<<<< 'ca' = Canada | 'ru' = Russia | 'us' = United States only (US)
$ShowBlocking = "no"                                                       # <<<<<< Set 'yes' if you want to check blocking IP and domain in Russia.
$ShowPush = "no"                                                           # <<<<<< Set 'yes' if you want to see Push Notification servers (a lot).
$ShowCloud = "yes"                                                         # <<<<<< Set 'yes' if you want to see BlackBerry UEM Cloud servers.
$ShowDirectConnect = "no"                                                  # <<<<<< Set 'yes' if you want to set dedicated BlackBerry Direct Connect servers.
$ShowBlackberryConnectivityNode = "yes"                                    # <<<<<< Set 'yes' if you want to see BlackBerry Connectivity Nodes.
$ShowBlackberrySite = "yes"                                                # <<<<<< Set 'yes' if you want to see BlackBerry site.
$ShowBEMS = "yes"                                                          # <<<<<< Set 'yes' if you want to see which serevers needed for BlackBerry Enterprise Mobility Server (BEMS).

Functions

  • Checks DNS records.
  • Checks delays to NOC servers.
  • Checks for opening ports on NOC servers.
  • “Alive” URLs of NOC servers are checked.
  • Especially for Russia, the check of blocking of IP addresses and domains by Roskomnadzor is thought out (can be turned on and off).
  • For companies that use Direct Connect servers, the ability to check them (you need to fill 2 variables inside the script).
  • Added a block of information on connecting the computer to the Internet.
  • Added check of BlackBerry Connectivity Node, BlackBerry Cloud and Push Notification servers.
  • The report is presented in the HTML format.

25 January 2019

Windows 10 please STOP reboot my PC/Laptop

Most of all in Windows 10 I hate preinstalled games and that it rebooting my laptop as he wants (most often at night and mostly without any notification).
To prevent it I have found a simple solution - disable "Reboot" task. But everything turned out to be more difficult. Windows still reboot my laptop (the screenshot below shows that task started even it disabled ("Отключено" in Russian)).


Therefore I decide to write a powershell script to prevent it once and for all.

04 August 2018

Exchange: How to reliably determine that a user is logged into mailbox?

Sometimes (for example while migration users are from another email system) there is a need for reliable determination that a user is logged into the mailbox (using Outlook or OWA).

The simplest answer is mailbox's lastlogontime (Get-MailboxStatistics). But it turnes out to be not quite true.
Attention! The attribute "LastLogonTime" of user's mailbox filled and updated when another user opens user's calendar.

Finally, I found 4 criterias which help to reliably determine that a user is logged into the mailbox.

  1. "lastlogontime" (Get-MailboxStatistics) - necessary but not sufficient attribute.
  2. "Languages" (Get-Mailbox) - this attribute filled when user entered into OWA and sometimes filled when entered into Outlook.
  3. "WorkingHoursTimeZone" (Get-MailboxCalendarConfiguration) - this attribute filled when user entered into OWA and sometimes filled when entered into Outlook. Deffault value - "Pacific Standard Time", so you can use it only if users are in a different time zone.
  4. "Quick Step Settings" (Get-MailboxFolderStatistics) - this is not an attribute, it is a checking for the presence of a folder "Quick Step Settings" in the mailbox, because it appears only when you open/configure Outlook.