cancel
Showing results for 
Search instead for 
Did you mean: 
  • ×
    Information
    Fix Windows 10 Update Issues

    Resolve Windows 10 or update issues on HP computer or printer– Click Here

  • post a message
  • ×
    Information
    Fix Windows 10 Update Issues

    Resolve Windows 10 or update issues on HP computer or printer– Click Here

  • post a message
Highlighted
New member
3 1 0 0
Message 1 of 3
222
Flag Post

MSASetup Script

HP Recommended
ZControl Connect

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

2 REPLIES 2
Highlighted
Author
New member
3 1 0 0
Message 2 of 3
Flag Post
HP Recommended

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

Reply
0 Kudos
Tags (1)
Highlighted
Level 4
Level 4
92 92 13 13
Message 3 of 3
Flag Post
HP Recommended

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.
Reply
0 Kudos
Be alert for scammers posting fake support phone numbers on the community. If you think you have received a fake HP Support message, please report it to us by clicking on "Flag Post".
† The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation