Jump to content

TGo2023

Members
  • Gesamte Inhalte

    4
  • Registriert seit

  • Letzter Besuch

Letzte Besucher des Profils

Der "Letzte Profil-Besucher"-Block ist deaktiviert und wird anderen Benutzern nicht angezeit.

Fortschritt von TGo2023

Rookie

Rookie (2/14)

  • Einen Monat dabei
  • Eine Woche dabei
  • Erste Antwort
  • Erster eigener Beitrag

Neueste Abzeichen

0

Reputation in der Community

  1. Hallo, Hat direkt Funktioniert, nachdem ich ihre Zeile mit meiner Ausgetauscht habe. Vielen dank! LG Tim
  2. Moin, Danke für den Tipp. Das heißt, wie müsste ich das umschreiben ? damit es funktionieren sollte. LG Tim
  3. Ich bekomme nun auf das Angepasste Script diese Fehlermeldung. # Import-Module ActiveDirectory Import-Module ActiveDirectory # Set the path for the CSV file $csvFile = "C:\Test\Contacts.csv" # Get all contact objects from the Active Directory $contacts = Get-ADObject -Filter {(objectClass -eq "contact") -and (-Searchbase "OU=Consulting,OU=Kontakte,DC=cvn,DC=local")} -Properties name,telephoneNumber # Create a new object to store the contacts $contactList = @() # Loop through the contacts and add them to the contact list foreach ($contact in $contacts) { $contactList += New-Object PSObject -Property @{ Name = $contact.name TelephoneNumber = $contact.telephoneNumber } } # Export the contact list to a CSV file $contactList | Export-Csv $csvFile -NoTypeInformation Fehlermeldung: Get-ADObject : Fehler beim Analysieren der Abfrage: "(objectClass -eq "contact") -and (-Searchbase "OU=Consulting,OU=Kontakte,DC=cvn,DC=local")" Fehlermeldung: "syntax error" an folgender Position: "35". In Zeile:8 Zeichen:13 + $contacts = Get-ADObject -Filter {(objectClass -eq "contact") -and (- ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ParserError: (:) [Get-ADObject], ADFilterParsingException + FullyQualifiedErrorId : ActiveDirectoryCmdlet:Microsoft.ActiveDirectory.Management.ADFilterParsingException,Micr osoft.ActiveDirectory.Management.Commands.GetADObject
  4. Hallo, Könntet ihr mir zufällig dort weiterhelfen wo der Fehler liegt ? # Import-Module ActiveDirectory Import-Module ActiveDirectory # Set the path for the CSV file $csvFile = "C:\Test\Contacts.csv" # Get all contact objects from the Active Directory $contacts = Get-ADObject -Filter {(objectClass -eq "contact") -and (Path "OU=Consulting,OU=Kontakte,DC=cvn,DC=local")} -Properties name,telephoneNumber # Create a new object to store the contacts $contactList = @() # Loop through the contacts and add them to the contact list foreach ($contact in $contacts) { $contactList += New-Object PSObject -Property @{ Name = $contact.name TelephoneNumber = $contact.telephoneNumber } } # Export the contact list to a CSV file $contactList | Export-Csv $csvFile -NoTypeInformation Fehlermeldung: Get-ADObject : Fehler beim Analysieren der Abfrage: "(objectClass -eq "contact") -and (Path "OU=Consulting,OU=Kontakte,DC=cvn,DC=local")" Fehlermeldung: "syntax error" an folgender Position: "40". In Zeile:8 Zeichen:13 + $contacts = Get-ADObject -Filter {(objectClass -eq "contact") -and (P ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ParserError: (:) [Get-ADObject], ADFilterParsingException + FullyQualifiedErrorId : ActiveDirectoryCmdlet:Microsoft.ActiveDirectory.Management.ADFilterParsingException,Micr osoft.ActiveDirectory.Management.Commands.GetADObject. Danke schonmal für die Hilfe!
×
×
  • Neu erstellen...