Run ACTIVE Directory commands from PowerShell installed on Linux RHEL 7

Copper Contributor

Hi,

 

I am trying to run the Active Directory commands from PowerShell installed on Linux RHEL 7.

 

has anyone able to do this from Linux.

 

PS /root> import-module ActiveDirectory
Import-Module: The specified module 'ActiveDirectory' was not loaded because no valid module file was found in any module directory.

 

 

PS /root> get-module -listavailable

Directory: /opt/microsoft/powershell/7/Modules

ModuleType Version PreRelease Name PSEdition ExportedCommands
---------- ------- ---------- ---- --------- ----------------
Manifest 1.2.5 Microsoft.PowerShell.Archive Desk {Compress-Archive, Expand-Archive}
Manifest 7.0.0.0 Microsoft.PowerShell.Host Core {Start-Transcript, Stop-Transcript}
Manifest 7.0.0.0 Microsoft.PowerShell.Management Core {Add-Content, Clear-Content, Clear-ItemProperty, Join-Path…}
Manifest 7.0.0.0 Microsoft.PowerShell.Security Core {Get-Credential, Get-ExecutionPolicy, Set-ExecutionPolicy, ConvertFrom-SecureString…}
Manifest 7.0.0.0 Microsoft.PowerShell.Utility Core {Export-Alias, Get-Alias, Import-Alias, New-Alias…}
Script 1.4.7 PackageManagement Desk {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource…}
Script 2.2.5 PowerShellGet Desk {Find-Command, Find-DSCResource, Find-Module, Find-RoleCapability…}
Script 2.0.5 PSDesiredStateConfiguration Core {Configuration, New-DscChecksum, Get-DscResource, Invoke-DscResource}
Script 2.1.0 PSReadLine Desk {Get-PSReadLineKeyHandler, Set-PSReadLineKeyHandler, Remove-PSReadLineKeyHandler, Get-PSR…
Binary 2.0.3 ThreadJob Desk Start-ThreadJob

 

2 Replies

Hello @Jayeshpc,

Can you please elaborate? What are you trying to achieve?

Can you please describe your use case?

 

As described here ActiveDirectory module is only supported in Windows and in PowerShell core relies on WindowsCompatibility module functionality:

Screenshot_20210129-012016.png

 

Hope that helps.

@AndySvintsI think powershell for unix is not very useful if it cannot be used for connect to active directory..