Jump to content
Welcome to our new Citrix community!
  • 0

Creating AD account via Powershell


Question

Hi,

I created an Identity pool with PowerShell (another domain) , and I am trying to create computer accounts in this pool , but I want to use a different account to create those computer accounts with  New-AcctADAccount but it is failing : New-AcctADAccount -IdentityPoolName 'test1' -Count 1 -ADUserName 'domain\user1' -ADPassword $password  , I know that the ADUserName and ADPAssword parameters are only used in cloud deployment

MY Question is : is there a way to use those parameters on an on-premise deployment , because I really need to force the use of that account to create those ad account in my powershell script

 

thanks in advance

Link to comment

2 answers to this question

Recommended Posts

  • 0

Hi,

 

If you want to use alternative credentials you can use invoke-command in powershell.

 

Using your example you could run:

 

Invoke-Command -Credential domain\user1 -scriptblock { New-AcctADAccount -IdentityPoolName 'test1' -Count 1}

 

You will get a prompt to enter the password for the "User1" account. If you want to run it without a prompt, create a PSCredential object containing the username and password and provide the PSCredential object for the -Credential parameter.

 

Andy

 

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...