-
1
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center. -
-
1
×InformationNeed Windows 11 help?Check documents on compatibility, FAQs, upgrade information and available fixes.
Windows 11 Support Center. -
- HP Community
- Apps, Services & Software
- ZCentral
- MSASetup Script

Create an account on the HP Community to personalize your profile and ask a question
06-24-2020 08:35 AM
Having issues with running the MSASetup.ps1 script error below, anyone can help out?
PS C:\Users\Z402-06\Downloads\HP_ZCentral_Connect 2020.0.1\Scripts> .\MSASetup.ps1 add ZCentral
.\MSASetup.ps1 : File C:\Users\Z402-06\Downloads\HP_ZCentral_Connect 2020.0.1\Scripts\MSASetup.ps1 cannot be loaded
because running scripts is disabled on this system. For more information, see about_Execution_Policies at
https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:2
+ .\MSASetup.ps1 add ZCentral
+ ~~~~~~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
06-24-2020 09:01 AM
After some research I managed to get passed that hurdle and and now I am stuck with the following error
PS C:\Users\Z402-06\Downloads\HP_ZCentral_Connect 2020.0.1\Scripts> .\MSASetup.ps1 add ZCentral
Import-Module : The specified module 'ActiveDirectory' was not loaded because no valid module file was found in any
module directory.
At C:\Users\Z402-06\Downloads\HP_ZCentral_Connect 2020.0.1\Scripts\MSASetup.ps1:32 char:1
+ Import-Module ActiveDirectory
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (ActiveDirectory:String) [Import-Module], FileNotFoundException
+ FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand
Get-ADDomain : The term 'Get-ADDomain' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\Users\Z402-06\Downloads\HP_ZCentral_Connect 2020.0.1\Scripts\MSASetup.ps1:36 char:17
+ $DOMAIN_NAME = (Get-ADDomain -Current LocalComputer).Name
+ ~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-ADDomain:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Get-ADDomain : The term 'Get-ADDomain' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At C:\Users\Z402-06\Downloads\HP_ZCentral_Connect 2020.0.1\Scripts\MSASetup.ps1:37 char:14
+ $DNS_ROOT = (Get-ADDomain -Current LocalComputer).DNSRoot
+ ~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-ADDomain:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
New-ServiceAccount
New-ServiceAccountHelper
New-ServiceAccountHelper: exception - The term 'New-ADServiceAccount' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
New-ADServiceAccount : The term 'New-ADServiceAccount' is not recognized as the name of a cmdlet, function, script
file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct
and try again.
At C:\Users\Z402-06\Downloads\HP_ZCentral_Connect 2020.0.1\Scripts\MSASetup.ps1:68 char:9
+ New-ADServiceAccount -Name $accountName -Enabled $true -DNSHo ...
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (New-ADServiceAccount:String) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : CommandNotFoundException
06-24-2020 10:12 AM
Hi there,
It seems that RSAT for Windows was not installed prior to setting up MSA.
There are some recommendations in the script that need to be executed before setting up MSA:
# Ensure you have the RSAT for Windows installed.
# https://docs.microsoft.com/en-us/powershell/module/addsadministration/?view=win10-ps
#
# Ensure the Kds root key has been created
# Run the powershell command: Get-KdsRootKey
# Inspect the output to verify that the root key exists. If not, the key must
# be created before attempting to create an MSA account. There is a 10 hour
# wait period required after deploying the root key before it becomes effective.
# If you find that you need to deploy a root key, run: Add-KdsRootKey –EffectiveImmediately
Also, section 3.1 of the User Guide should help you troubleshoot these issues.
Here's a link to the document:
http://h20195.www2.hp.com/v2/GetDocument.aspx?docname=4AA7-7172ENW
I work on behalf of HP.