Skip to main content

1E 8.1 (on-premises)

Example Active Directory Single Site script

Sample script that scans the Active Directory (AD) environment for all sites and subnets and stores the information in the Content Distribution locations table. This information can then be retrieved by Nomad at a later stage when implementing the Single Site Download (SSD) or Single Site PBA features.You can view Nomad Sites in theNomad Sites page.

The Nomad Sites page is primarily designed to show how the network is being used for content distribution in different locations. It focuses on the volume of content downloaded from peers vs over the WAN, rather than the status of specific Content Titles in a given site. You can see what content is available in a given site by looking at the Content tab for that site.

Note

A Nomad Site corresponds to Nomad Single Site Download (SSD) site. Customers that have implemented SSD and upgrade ActiveEfficiency to the Nomad app and Content Distribution will see their defined SSD locations displayed as Nomad Sites in the app.

Any subnets that are not included in a Nomad SSD Site definition will be represented in a site named Unknown. If no SSD sites have been defined, all subnets will be included in the 'Unknown' site.

Prerequisites

The PostADSitesandSubnets.ps1 script is available from the Scripts folder in the Nomad Branch Tools download zip, downloadable from the 1E Support Portal https://support.1e.com/.

The script requires:

  • Content Distribution version 8.0 or above.

  • Use PowerShell version 5.0 or above.

  • Run the script on a device joined to the AD domain where the required information resides and have permissions to read device attributes from AD.

Using the example PostADSitesandSubnets script

The sample script:

  1. Clears all current sites and subnet information stored in the ContentDistribution database

  2. Connects to LDAP://RootDSE and enumerates the subnets for each Site and adds them to the ContentDistribution database.

Note

The example script does not support supernets.

You can modify the script to include filters and logic to ignore or add specific Sites or subnets.

Note

If you prefer to maintain your own list of Sites and subnets then you should consider using Example Single Site script, or Example Location Discovery script, instead.

Parameters

The script uses the following parameters:

  • PlatformUrl as a mandatory parameter - you must provide the Tachyon Platform base URL

  • Tls12 as an optional switch parameter - include this switch if TLS 1.2 is required to connect to the Tachyon Platform server.

For example, to run the script on a PowerShell command-line:

Example

.\PostADSitesandSubnets.ps1 -PlatformUrl https://tachyon.1etrn.local:443 -Tls12
How it works

The script clears all current sites and subnet information stored in the ContentDistribution database, it then scans the Active Directory for stored sites and subnets and stores these in ContentDistribution. The AD environment scanned, is for the domain containing the device where you run the script.

In our example, we have two distinct locations (a datacenter and a remote office), with the servers all located in the datacenter and the workstations all located in the remote office. It just so happens that the remote office has two subnets. Active Directory Sites have already been defined to reflect this configuration.

Before running PostADSitesandSubnets.ps1 we only have an unknown Nomad site as you can see in the accompanying picture showing the Nomad Sites page.

The Nomad Sites page is primarily designed to show how the network is being used for content distribution in different locations. It focuses on the volume of content downloaded from peers vs over the WAN, rather than the status of specific Content Titles in a given site. You can see what content is available in a given site by looking at the Content tab for that site.

Note

A Nomad Site corresponds to Nomad Single Site Download (SSD) site. Customers that have implemented SSD and upgrade ActiveEfficiency to the Nomad app and Content Distribution will see their defined SSD locations displayed as Nomad Sites in the app.

Any subnets that are not included in a Nomad SSD Site definition will be represented in a site named Unknown. If no SSD sites have been defined, all subnets will be included in the 'Unknown' site.

AD Sites and Services
Nomad sites Unknown

In our example we downloaded the script to C:\Temp\nomadbranch.v8.0.4.265\scripts folder, we right-click on PostADSitesandSubnets.ps1 and select Edit to open the file in Windows PowerShell ISE.

We enter https://tachyon.1etrn.local/ as the platform url for our environment and hit return.

PostADSitesandSubnets running

Once the script completes we can return to the Nomad app and refresh the page, now we can see our environment's sites and subnets defined on the Nomad sites page.

Nomad sites post script