Skip to Content
Active Directory Administration Cookbook
book

Active Directory Administration Cookbook

by Sander Berkouwer
May 2019
Intermediate to advanced
620 pages
21h 41m
English
Packt Publishing
Content preview from Active Directory Administration Cookbook

Creating the script

With the AD FS server role installed, we can use the PowerShell cmdlet to create the SQL scripts to create the databases on the SQL Server backend.

Use the following lines of PowerShell to install the AD FS server role in an elevated window:

New-Item "C:\ADFSSQLScript" -Type DirectoryExport-AdfsDeploymentSQLScript -DestinationFolder "C:\ADFSSQLScript" -ServiceAccountName LUCERNPUB\ADFSgMSA$

Change the values for the folder and the gMSA in the preceding lines of PowerShell.

As the gMSA's object type originates from the computer object type, make sure to add $ at the end of the object name in the script.

This will create two files in the specified folder, as follows:

  • CreateDB.sql
  • Set-Permissions.sql
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Active Directory Cookbook

Active Directory Cookbook

Robbie Allen
Active Directory Cookbook, 4th Edition

Active Directory Cookbook, 4th Edition

Brian Svidergol, Robbie Allen

Publisher Resources

ISBN: 9781789806984Supplemental Content