PowerShellMafia / PowerSploit

PowerSploit - A PowerShell Post-Exploitation Framework
Other
11.68k stars 4.59k forks source link

Get-DomainPolicyData is not recognized when importing PowerSploit.psm1 module #363

Open phackt opened 3 years ago

phackt commented 3 years ago

Hello, please check the following commands:

PS C:\Users\Administrator\Documents\Invoke-Recon> Import-Module .\modules\PowerSploit\PowerSploit.psm1
PS C:\Users\Administrator\Documents\Invoke-Recon> Get-Command Get-DomainPolicy

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Alias           Get-DomainPolicy                                   0.0        PowerSploit

PS C:\Users\Administrator\Documents\Invoke-Recon> Get-DomainPolicy
Get-DomainPolicy : The term 'Get-DomainPolicyData' 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 line:1 char:1
+ Get-DomainPolicy
+ ~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Get-DomainPolicyData:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\Users\Administrator\Documents\Invoke-Recon> Import-Module .\modules\PowerSploit\Recon\PowerView.ps1
PS C:\Users\Administrator\Documents\Invoke-Recon> Get-DomainPolicy

Unicode        : @{Unicode=yes}
SystemAccess   : @{MinimumPasswordAge=1; MaximumPasswordAge=42; MinimumPasswordLength=7; PasswordComplexity=1; PasswordHistorySize=24; LockoutBadCount=0; RequireLogonToChangePassword=0; ForceLogoffWhenHourExpire=0; ClearTextPassword=0;
                 LSAAnonymousNameLookup=0}
KerberosPolicy : @{MaxTicketAge=10; MaxRenewAge=7; MaxServiceAge=600; MaxClockSkew=5; TicketValidateClient=1}
RegistryValues : @{MACHINE\System\CurrentControlSet\Control\Lsa\NoLMHash=System.Object[]}
Version        : @{signature="$CHICAGO$"; Revision=1}
Path           : \\phackt.local\sysvol\phackt.local\Policies\{31B2F340-016D-11D2-945F-00C04FB984F9}\MACHINE\Microsoft\Windows NT\SecEdit\GptTmpl.inf
GPOName        : {31B2F340-016D-11D2-945F-00C04FB984F9}
GPODisplayName : Default Domain Policy

Someone has ever faced this issue ?

Thanks a lot,

grese commented 3 years ago

I'm having a similar issue with some of the Recon modules...

"The term 'Get-DomainController' is not recognized as the name of a cmdlet, function"