Code Monkey home page Code Monkey logo

Comments (18)

PrzemyslawKlys avatar PrzemyslawKlys commented on August 10, 2024

Does it work with earlier version?

from gpozaurr.

SokratisUNI avatar SokratisUNI commented on August 10, 2024

I've tried the latest module towards a few systems (Server 2022) and had the same exact error.

Yes, it worked just fine, actually I was working on it yesterday.

Let me know if you need any additional info / logs.

from gpozaurr.

SokratisUNI avatar SokratisUNI commented on August 10, 2024

Not sure what's wrong, maybe I'm doing something wrong...

Just force-installed from again and "invoke-gpozaurr" is not there anymore.

I hope am not doing something wrong here....
++++++++++++++++++++++++++++++++
PS C:> install-module -name gPOZaurr -Scope AllUsers -Force

PS C:> Import-Module GPOZaurr -Verbose
VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\GPOZaurr\1.1.0\GPOZaurr.psd1'.
VERBOSE: Populating RepositorySourceLocation property for module GPOZaurr. VERBOSE: Loading module from path 'C:\Program Files\WindowsPowerShell\Modules\GPOZaurr\1.1.0\GPOZaurr.psm1'. VERBOSE: Importing function 'Export-GPOZaurrContent'.
VERBOSE: Importing function 'Get-GPOZaurrBrokenLink'.
VERBOSE: Importing function 'Get-GPOZaurrMissingFiles'.
VERBOSE: Importing function 'Get-GPOZaurrOrganizationalUnit'.
VERBOSE: Importing function 'Get-GPOZaurrPermissionAnalysis'.
VERBOSE: Importing function 'Get-GPOZaurrPermissionIssue'.
VERBOSE: Importing function 'Get-GPOZaurrRedirect'.
VERBOSE: Importing function 'Get-GPOZaurrUpdates'.
VERBOSE: Importing function 'Invoke-GPOZaurrContent'.
VERBOSE: Importing function 'Remove-GPOZaurrLinkEmptyOU'.
VERBOSE: Importing function 'Repair-GPOZaurrBrokenLink'.
VERBOSE: Importing function 'Repair-GPOZaurrPermission'.
VERBOSE: Importing function 'Set-GPOZaurrStatus'.
VERBOSE: Importing function 'Skip-GroupPolicy'.
VERBOSE: Importing alias 'Find-GPO'.
PS C:>

from gpozaurr.

PrzemyslawKlys avatar PrzemyslawKlys commented on August 10, 2024

Make sure import-module activedirectory and grouppolicy are working

from gpozaurr.

SokratisUNI avatar SokratisUNI commented on August 10, 2024

Will do some more testing and let you know.
Yep, already did that.
Tried to run it on server member and on an DC, for some reason it doesn't wants to cooperate today :)

Thanks for your help.

from gpozaurr.

PrzemyslawKlys avatar PrzemyslawKlys commented on August 10, 2024

I will check main issue. I believe i did change that function to implement better discovery

from gpozaurr.

SokratisUNI avatar SokratisUNI commented on August 10, 2024

Baahh, doing to many things at the same time doesn't help 👎
The import module works just fine, I've tried on a server where GP was not installed thus the result above.

Still getting the same error "At C:\Program Files\WindowsPowerShell\Modules\GPOZaurr\1.1.0\GPOZaurr.psm1:2584 char:24".

Thanks again for your efforts.

from gpozaurr.

PrzemyslawKlys avatar PrzemyslawKlys commented on August 10, 2024

Can you run Get-WinADDuplicateObject -Verbose and let me know when it crashes. If it doesn't crash run Get-GPOZaurrDuplicateObject -Verbose to confirm

from gpozaurr.

SokratisUNI avatar SokratisUNI commented on August 10, 2024

Hi, here's the result.
Had the same result using PS 5.1 and PWSH 7.4.1
After the errors pasted below, it seems that is working fine, is able to find some duplicates GP.


`PS C:\Users\Admin\Desktop> Get-WinADDuplicateObject -Verbose
Get-WinADDuplicateObject : The term 'Get-WinADDuplicateObject' 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-WinADDuplicateObject -Verbose
  •   + CategoryInfo          : ObjectNotFound: (Get-WinADDuplicateObject:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    
    

PS C:\Users\Admin\Desktop> Get-GPOZaurrDuplicateObject -Verbose
VERBOSE: Get-WinADDuplicateObject - Processing MyLab.local
VERBOSE: Get-WinADDuplicateObject - Processing MyLab.local - DC=MyLab,DC=local
VERBOSE: Get-WinADDuplicateObject - Processing MyLab.local - DC=DomainDnsZones,DC=MyLab,DC=local
Get-ADObject : Directory object not found
At C:\Program Files\WindowsPowerShell\Modules\GPOZaurr\1.1.0\GPOZaurr.psm1:2584 char:24

  • ... $Objects = Get-ADObject @getADObjectSplat -SearchBase $Partition
  •                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (:) [Get-ADObject], ADIdentityNotFoundException
    • FullyQualifiedErrorId : ActiveDirectoryCmdlet:Microsoft.ActiveDirectory.Management.ADIdentityNotFoundException,M
      icrosoft.ActiveDirectory.Management.Commands.GetADObject

VERBOSE: Get-WinADDuplicateObject - Processing root.local
VERBOSE: Get-WinADDuplicateObject - Processing root.local - CN=Configuration,DC=root,DC=local
VERBOSE: Get-WinADDuplicateObject - Processing root.local - DC=ForestDnsZones,DC=root,DC=local
Get-ADObject : A referral was returned from the server
At C:\Program Files\WindowsPowerShell\Modules\GPOZaurr\1.1.0\GPOZaurr.psm1:2584 char:24

  • ... $Objects = Get-ADObject @getADObjectSplat -SearchBase $Partition
  •                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ResourceUnavailable: (:) [Get-ADObject], ADReferralException
    • FullyQualifiedErrorId : ActiveDirectoryServer:8235,Microsoft.ActiveDirectory.Management.Commands.GetADObject

VERBOSE: Get-WinADDuplicateObject - Processing root.local - DC=root,DC=local
VERBOSE: Get-WinADDuplicateObject - Processing root.local - DC=DomainDnsZones,DC=root,DC=local
Get-ADObject : Directory object not found
At C:\Program Files\WindowsPowerShell\Modules\GPOZaurr\1.1.0\GPOZaurr.psm1:2584 char:24

  • ... $Objects = Get-ADObject @getADObjectSplat -SearchBase $Partition
  •                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (:) [Get-ADObject], ADIdentityNotFoundException
    • FullyQualifiedErrorId : ActiveDirectoryCmdlet:Microsoft.ActiveDirectory.Management.ADIdentityNotFoundException,M
      icrosoft.ActiveDirectory.Management.Commands.GetADObject

`

from gpozaurr.

PrzemyslawKlys avatar PrzemyslawKlys commented on August 10, 2024

Ok, i think I know what could be wrong. You don't have domaindnszones, but only forest zones. I'll try to do some verification first, and fix it.

from gpozaurr.

PrzemyslawKlys avatar PrzemyslawKlys commented on August 10, 2024

What about get-adrootdse can you list me things in namingcontexts?

from gpozaurr.

SokratisUNI avatar SokratisUNI commented on August 10, 2024

Yeah, here it is:

`PS C:\Users\Admin> Get-ADRootDSE

configurationNamingContext : CN=Configuration,DC=root,DC=local
currentTime : 2/7/2024 11:19:01 AM
defaultNamingContext : DC=MyLab,DC=local
dnsHostName : DC01.MyLab.local
domainControllerFunctionality : Windows2016
domainFunctionality : Windows2016Domain
dsServiceName : CN=NTDS Settings,CN=DC01,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=root,DC=local
forestFunctionality : Windows2016Forest
highestCommittedUSN : 172409633
isGlobalCatalogReady : {TRUE}
isSynchronized : {TRUE}
ldapServiceName : root.local:[email protected]
namingContexts : {CN=Configuration,DC=root,DC=local,CN=Schema,CN=Configuration,DC=root,DC=local,DC=MyLab,DC=local}
rootDomainNamingContext : DC=root,DC=local
schemaNamingContext : CN=Schema,CN=Configuration,DC=root,DC=local
serverName : CN=DC01,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=root,DC=local
subschemaSubentry : CN=Aggregate,CN=Schema,CN=Configuration,DC=root,DC=local

PS C:\Users\Admin>`

from gpozaurr.

PrzemyslawKlys avatar PrzemyslawKlys commented on August 10, 2024

Ok, so it seems you have neither ForestDnsZones or DomainDnsZones in your forest - how is that possible? Do you have some special DNS settings in your forest?

(Get-ADRootDSE).namingContexts
DC=ad,DC=evotec,DC=xyz
CN=Configuration,DC=ad,DC=evotec,DC=xyz
CN=Schema,CN=Configuration,DC=ad,DC=evotec,DC=xyz
DC=DomainDnsZones,DC=ad,DC=evotec,DC=xyz
DC=ForestDnsZones,DC=ad,DC=evotec,DC=xyz

Is my standard setup

from gpozaurr.

SokratisUNI avatar SokratisUNI commented on August 10, 2024

Yeah, we don't use AD DNS zones on this Forest, neither on any other, I mean AD integrated.
We use external one.

Maybe this looks like an edge case, not sure if it's worth working on it.

from gpozaurr.

PrzemyslawKlys avatar PrzemyslawKlys commented on August 10, 2024

Ye, i will do additional checks and ignore this + give warnings. You will just ignore warnings. I don't like RED :)

from gpozaurr.

SokratisUNI avatar SokratisUNI commented on August 10, 2024

haha me too :).
Thanks for your time.

from gpozaurr.

PrzemyslawKlys avatar PrzemyslawKlys commented on August 10, 2024

SHould be fixed. Install new version and retry.

from gpozaurr.

SokratisUNI avatar SokratisUNI commented on August 10, 2024

Thanks @PrzemyslawKlys , new version works perfectly and I do get the DNS zone not found warning.

from gpozaurr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.