How to configure active directory activation from powershell/commandline

activationkmswindows-server-2016

Although it's a simple matter to configure Active Directory activation on Windows Server 2016 once the VA role is installed using the GUI, I need a way to configure this from the command line or preferably from powershell, however, I can't seem to find any powershell modules for this role.

Has anyone done this before?

PS. I am not looking to set up a KMS host using slmgr.vbs. I need to install a KMS key for active directory activation as you can do in the Volume Activation Tools GUI.

Best Answer

I eventually found out how you can do it, still using slmgr.vbs:

slmgr.vbs /ad-activation-online <kms key>