MVP - Most Valuable Professional
rss

Just can't get enough of IT

This blog is about mostly anything in IT. But the primary focuses are Microsoft Technologies like Exchange, Office 365, Azure and Cloud Security.

Exchange Server 2013Exchange Server 2016Description

This scripts checks multiple Exchange Server 2013 OWA web.config files for existence of IMCertificateThumbprint and IMServerName Xml nodes required for Skype for Business OWA integration.

This mostly required after installing a new Exchange Server Cumulative Update.

IMServerName is the FQN of the Front End Pool

IMCertificateThumbprint is the certificate thumbprint of the Exchange OWA certificate

Exchange Server 2016 stores the IM information in Active Directory.

Example

# Update all OWA web.config files to Skype for Business FE Pool myfepool.varunagroup.de and thumbprint 

.\Set-OwaIMSettings.ps1 -FrontEndPoolFqdn myfepool.varunagroup.de -CertificateThumbprint "1144F22E9E045BF0BA421CAA4BB7AF12EF570C17"

Version History

  • 1.0, Initial community release

Links

Additional Credits

Additional credits go to Juan Jose Martinez Moreno

Follow

 

Read More »

PowerShellDescription

This script copies files (.ps1, .cmd, .xml) from your scripts to a new target while persisting the directory structure.

The intention is to copy files from a script development or administrative system to a central (UNC based) file repository.

*.log files are excluded from being copied to the target directory.

Only new files and files changed during the last 180 days are copied.

 

Examples

# EXAMPLE
# Copy all files using the parameter default
.\Copy-ScriptsToRepository

# EXAMPLE
# Copy files from a dedicated source to a different destination folder
.\Copy-ScriptsToRepository -Source f:\Scripts -Destination \\MYSERVER\Scripts

Version History

  • 1.0, Initial community release

Links

Follow

 

Read More »
On February 13, 2017
0 Comment
1189 Views

Exchange Server 2013Exchange Server 2016Description

This script helps administrators and support desk personnel to connect an Exchange Server 2013+ using remote PowerShell. You can either connect to a dedicated Exchange Server or connect to a randomly selected Exchange Server.

You can implement the function in your own scripts to connect to Exchange remotely. David Lee has written an excellent post about how to use saved credentials with PowerShell scripts.

Examples

# EXAMPLE
# Connect to the specified server EX01
./Connect-ToExchange.ps1 -Server EX01

# EXAMPLE
# Connect to a randomly selected server
./Connect-ToExchange.ps1

Version History

  • 1.0, Initial community release

Links

Follow

Read More »

Exchange Server 2007Exchange Server 2010Exchange Server 2013Exchange Server 2016Description

The script gathers a lot of Exchange organizational configuration data for documentation purposes.

The data is stored in separate log files. The log files are stored in a separate subfolder located under the script directory.

An exisiting subfolder will be deleted automatically.

Optionally, the log files can automatically be zipped. The zipped archive can be sent by email as an attachment.

 

When the script runs, a progress bar informs about the current step being executed.

Script progress bar

All files are stored in a dedicated subfolder (default name: ExchangeOrgInfo)

Example of exported files

The hash table $infoSources defines the following

  • Types of Exchange configuration data to be gathered
  • Output type for each configuration data entity
  • Optional paramaters for each configuration data entity
  • Attribute name for object sorting within an entity
  • The order of the data to be gathered (long running tasks are at the end)

 

Examples

# EXAMPLE 1
# Gather all data using MYCOMPANY as a prefix
    
.\Get-ExchangeOrganizationDetails.ps1 -Prefix MYCOMPANY

# EXAMPLE 2
# Gather all data using MYCOMPANY as a prefix and save all files as a compressed archive
    
.\Get-ExchangeOrganizationDetails.ps1 -Prefix MYCOMPANY -Zip

Version History

  • 1.0, Initial community release
  • 1.1, Updated and some PowerShell hygiene

Links

 

Follow

 

 

Read More »

Exchange Server 2007When you are dealing with legacy public folders and you are still using Exchange Server 2007 you might be interested in the overall size of the data hosting in your public folder hierarchy.

The following script calculates the public folder size based on the public folder statistics output provided by Exchange Server 2007.

# Server name hosting legacy public folders
$Server = 'PUBLICFOLDERSERVER'

# Fetch legacy public folder statistics
$Folders = Get-PublicFolderStatistics -server $Server | Where-Object {($_.TotalItemSize -ne "0B")}  

$TotalBytes = 0

# Let's do some string manipulation stuff
ForEach ($Item in $Folders) {
  
  $TotalItemSize = $Item.TotalItemSize
  $TotalItemSize = [string]$TotalItemSize
     
  if ( ($TotalItemSize.contains('KB')) ) {
      $TotalItemSize = $TotalItemSize -Replace ('KB','')
      $TotalItemSize = [int]$TotalItemSize * 1024
  }
     
  $TotalItemSize = $TotalItemSize -Replace ('B','')
  $TotalBytes = [long]$TotalItemSize + [long]$TotalBytes
}

# Output as GB 
[math]::round($TotalBytes/1Gb, 2)

Enjoy.

 

 

 

Read More »