Respected Contributor.. hpooStudent Respected Contributor..
Respected Contributor..
955 views

Question of active directory Powershell module

Jump to solution

hi i would like to check if we use active directory Powershell commands in our powershell script do i need to install the active directory Powershell module on the machine that is running OO central? Look forward to any suggestions or reply. 🙂

 

Untitled.png

Labels (1)
0 Likes
1 Solution

Accepted Solutions
mostafa_hassan Outstanding Contributor.
Outstanding Contributor.

Re: Question of active directory Powershell module

Jump to solution

Yes, I have done that earlier for activate/disable some ad-computer objects in active directory that for OO with CSA.

Regards
Mostafa Hassan
--------------------------------------
If my post helped you, kindly click the 'Kudos' button.
5 Replies
mostafa_hassan Outstanding Contributor.
Outstanding Contributor.

Re: Question of active directory Powershell module

Jump to solution

Yes, I have done that earlier for activate/disable some ad-computer objects in active directory that for OO with CSA.

Regards
Mostafa Hassan
--------------------------------------
If my post helped you, kindly click the 'Kudos' button.
Respected Contributor.. hpooStudent Respected Contributor..
Respected Contributor..

Re: Question of active directory Powershell module

Jump to solution

thanks Mostafa.

0 Likes
mostafa_hassan Outstanding Contributor.
Outstanding Contributor.

Re: Question of active directory Powershell module

Jump to solution

you are welcome :), just keep in mind that to mention that if you running remote PowerShell script over active directory direct to Active directory no need for AD module in OO.

that if u have limitation to access AD from a customer perspective for security reasons. something like below

Import-Module ActiveDirectory

$userName = "${username}"

$secure_string_pwd= convertto-securestring "${password}" -asplaintext -force

$cred = new-object management.automation.pscredential $userName,$secure_string_pwd

 

$Adaccount = Get-ADComputer ${vm} ActiveDirectory\Disable-ADAccount $Adaccount -credential $cred

 

ActiveDirectory\Move-adobject $Adaccount -targetpath "OU=Windows,ou=Servers,ou= Computers,dc=domain,dc=local" -Credential $cred Get-ADComputer ${vm}

Regards
Mostafa Hassan
--------------------------------------
If my post helped you, kindly click the 'Kudos' button.
0 Likes
Respected Contributor.. hpooStudent Respected Contributor..
Respected Contributor..

Re: Question of active directory Powershell module

Jump to solution

hi Mostafa,

you mentioned about " remote PowerShell script over active directory" that part i am lightly confused. the current setup is powershell script is ruinning from OO Central but conncting to remote AD server to perform certain task, in this case do we need the AD Powershell module installed in the OO central server (i was thinking operation will only work only if you are able able to execute AD powershell commands from OO central server manually)? 

YH

0 Likes
mostafa_hassan Outstanding Contributor.
Outstanding Contributor.

Re: Question of active directory Powershell module

Jump to solution

Hello, 

Sorry for late response, what I meant some customers don't allow remote PowerShell session to AD directly, 

so other way is to install AD-Powershell Module in Central and run that from central with an account that has permission to do so whatever action in the AD.

Regards
Mostafa Hassan
--------------------------------------
If my post helped you, kindly click the 'Kudos' button.
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.