Set-AvailabilityConfig in Powershell: All You Need To Know

Managing free/busy information across your organization can be complex, especially when dealing with cross-forest environments or external tenants.

The Set-AvailabilityConfig cmdlet in PowerShell addresses this challenge.

Whether configuring user-specific access, setting up organization-wide proxies, or controlling external tenants' access to availability data, this cmdlet offers flexibility.

Learn how to use Set-AvailabilityConfig in five easy steps!

What is Set-AvailabilityConfig Cmdlet in PowerShell?

The Set-AvailabilityConfig cmdlet in ExchangePowerShell is a command used to configure access levels for free/busy information within an organization. It allows administrators to define specific accounts or security groups, either on a per-user or organization-wide basis, that are trusted for availability proxy requests.

Below is the syntax of Set-AvailabilityConfig:

Set-AvailabilityConfig

   [-AllowedTenantIds <MultiValuedProperty>]

   [-Confirm]

   [-DomainController <Fqdn>]

   [-OrgWideAccount <SecurityPrincipalIdParameter>]

   [-PerUserAccount <SecurityPrincipalIdParameter>]

   [-WhatIf]

   [<CommonParameters>]

3 Things You Can Do with the Set-AvailabilityConfig Cmdlet

Using this command becomes simpler once you understand its parameters. Here are three tasks you can perform using Set-AvailabilityConfig in PowerShell:

  1. Control Free/Busy Sharing with Specific Tenants: In Exchange Online, you can use the AllowedTenantIds parameter to specify which Microsoft 365 tenants can access your organization’s free/busy information. This parameter is useful for secure collaboration between trusted organizations.
  2. Set an Organization-Wide Proxy Account: With the OrgWideAccount parameter, administrators can designate an account or security group to handle free/busy proxy requests across the entire organization. This is particularly valuable for managing availability in environments with multiple Exchange forests that are not inherently trusted.
  3. Configure Per-User Free/Busy Access: The PerUserAccount parameter allows you to define individual accounts or groups that can issue proxy availability service requests on a per-user basis. This gives granular control over who can access free/busy data, enhancing security and flexibility.

Prerequisites for Using the Set-AvailabilityConfig Cmdlet

In order to use this command, you need to comply with these simple prerequisites:

  • Permissions Assigned: Ensure you have the required permissions to run the cmdlet. The specific permissions depend on the environment (on-premises Exchange or Exchange Online).
  • Exchange Environment: Confirm whether you're working in on-premises Exchange or Exchange Online, as some parameters are exclusive to Exchange Online.
  • Trusted Accounts or Groups: Identify the accounts or security groups you want to configure for organization-wide or per-user free/busy proxy access. These can be mailbox users, mail users, or security groups.
  • Tenant IDs for Exchange Online: If configuring free/busy sharing in Exchange Online, you need the tenant ID(s) of the organizations you want to allow access to.



5-Step Guide to Using the Set-AvailabilityConfig Cmdlet

Follow these five steps to use this command effectively.

Step 1: Connect to Exchange Online PowerShell

Before you can execute the Set-AvailabilityConfig cmdlet, you need to establish a connection with Exchange Online using PowerShell.

To do this, use the Connect-ExchangeOnline cmdlet:

Connect-ExchangeOnline -UserPrincipalName admin@yourdomain.com

This command prompts you to enter the credentials of an admin user. Once the connection is successful, you’ll be ready to run commands that interact with your Exchange environment.

Step 2: Understanding the Parameters for Set-AvailabilityConfig

As we mentioned before, the Set-AvailabilityConfig cmdlet is used to manage and control access to free/busy information within your organization.

To use this cmdlet effectively, you need to understand its most important parameters:

  • PerUserAccount: This parameter is used when you need to assign a user or security group to manage free/busy information on a per-user basis. For example, if you want a specific user to handle free/busy data for other users, this is the parameter you’ll use.
  • OrgWideAccount: This parameter is used when you want to set up an organization-wide free/busy proxy account. It’s generally used for administrative purposes, especially in cross-forest or large-scale environments.
  • AllowedTenantIds: This is an Exchange Online-specific parameter. It allows you to restrict which external Microsoft 365 tenants can access your organization’s free/busy data. It’s useful if you want to control or limit the sharing of availability data with external organizations.

Understanding these parameters allows you to control how free/busy information is shared internally and externally, and determine who can access this data.

Step 3: Set Up a Per-User Free/Busy Proxy Account

The PerUserAccount parameter allows you to assign a specific user or security group as the responsible party for handling free/busy information on a per-user basis.

Let’s say you want to assign the user james@meetingroom365.com as the per-user proxy for handling free/busy information. To do that, run this command:

Set-AvailabilityConfig -PerUserAccount james@meetingroom365.com

This command configures james@meetingroom365.com as the account authorized to access free/busy information for specified users or those within the same organization.

Step 4: Configure an Organization-Wide Free/Busy Proxy Account

If you need to configure an account or group that has access to free/busy information for the entire organization, you can use the OrgWideAccount parameter.

Now, let’s assume you want to set james@meetingroom365.com as the organization-wide proxy for free/busy information:

Set-AvailabilityConfig -OrgWideAccount james@meetingroom365.com

This command sets james@meetingroom365.com as the account with permission to access all users' free/busy data across the entire organization.

Step 5: Restrict Free/Busy Sharing to Specific Tenants (Exchange Online Only)

In Exchange Online, you can control which external tenants are allowed to access your organization’s free/busy information by using the AllowedTenantIds parameter.

To allow access to your free/busy data for specific external tenants, use the following command:

Set-AvailabilityConfig -AllowedTenantIds "b7d1a8a3-0735-49f9-a598-45b3c7421253"

This command allows only the tenant with the ID "b7d1a8a3-0735-49f9-a598-45b3c7421253" to access free/busy information from your organization.

You can specify multiple tenants by separating their tenant IDs with commas, which provides flexibility in sharing availability data.

Optimizing Set-AvailabilityConfig for Your Exchange Setup

By effectively using the Set-AvailabilityConfig command, you ensure that internal and external users have the appropriate access to availability information, whether it's for specific users or organization-wide configurations.

Here’s a recap of the key points discussed:

  • Set-AvailabilityConfig works to set per-user or organization-wide accounts to manage free/busy data sharing within your Exchange environment.
  • With the command, you can control which external tenants can view your availability data using tenant IDs, ensuring security and privacy.
  • If the cmdlet isn’t working, check permissions and ensure you're connected to Exchange PowerShell, as missing permissions or connection problems are common causes of failure.