Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Active Directory

Empfohlene Antworten

Veröffentlicht

Guten Morgen,

folgendes Problem:

Ich hab eine csv-Datei, in der Name,Vorname,E-Mail-Adresse,... enthalten sind.

Diese möchte ich unter einem Exchange 2007 64-Bit in die E-Mail-Kontakte miteinfplegen. Ich möchte keine Verteilergruppe und kein neues Postfach.

Ich habe im Internet schon verschiedene Scripts gefunden, jedoch ging keines (trotz umschreiben).

Das "aktuellste" ist:

Add-Content c:\debug.txt "::Starting Import: ";

$err = "";

int $fakecounter = 1;

Import-CSV contacts.csv | ForEach {

$output = "::";

$display = "";

$email = $_."E-mail Address";

$fakecounter++;

if ($_."First Name")

{

$display = $_."First Name";

}

if($_."Middle Name")

{

$display = $display + " " + $_."Middle Name";

}

if($_."Last Name")

{

if ($_."First Name")

{

$display = $display + " " + $_."Last Name";

} else

{

$display = $_."Last Name";

}

}

if($display)

{

} else

{

$display = $_."Company"

}

$output = $output + "Importing: " + $display;

Add-Content c:\debug.txt $output;

$otherfax = $_."Home Fax" + ", " + $_."Other Fax";

$otherphone = $_."Primary Phone" + ", " + $_."Business Phone 2" + ", " + $_."Car Phone" + ", " + $_."Callback" + ", " + $_."Company Main Phone" + ", " + $_."Other Phone";

$otherhome = $_."Home Phone 2" + ", " + "";

$businessstreet = $_."Business Street" + " " + $_."Business Street 2" + " " + $_."Business Street 3";

$postofficebox = $_."Business Address PO Box" + ", " + "";

$initials = $_."Initials";

$notes = $_."Notes";

if($initials.Length -gt 6)

{

$initials = $initials.Substring(0, 6);

}

if($Notes.Length -gt 1022)

{

$notes = $notes.Substring(0, 1022);

}

if($email -like "*@*")

{

New-MailContact -DomainController dc.contoso.com -Name $display -Firstname $_."First Name" -Lastname $_."Last Name" -ExternalEmailAddress $email -OrganizationalUnit "contoso.com/OU/Contacts" -ErrorAction SilentlyContinue -ErrorVariable +err | Set-Contact -DomainController dc.contoso.com -AssistantName $_."Assistant's Name" -City $_."Business City" -Company $_."Company" -Department $_."Department" -DisplayName $display -Fax $_."Business Fax" -HomePhone $_."Home Phone" -Initials $initials -MobilePhone $_."Mobile Phone" -Name $display -Notes $notes -Office $_."Location" -OtherFax $otherfax -OtherHomePhone $otherhome -OtherTelephone $otherphone -Pager $_."Pager" -Phone $_."Business Phone" -PostalCode $_."Business Postal Code" -PostOfficeBox $postofficebox -StateOrProvince $_."Business State" -StreetAddress $businessstreet -TelephoneAssistant $_."Assistant's Phone" -Title $_."Title" -WebPage $_."Web Page" -ErrorAction SilentlyContinue -ErrorVariable +err;

} else

{

$email = "blank" + $($fakecounter) + "@contoso.com";

New-MailContact -DomainController dc.contoso.com -Name $display -Firstname $_."First Name" -Lastname $_."Last Name" -ExternalEmailAddress $email -OrganizationalUnit "contoso.com/OU/Contacts" -ErrorAction SilentlyContinue -ErrorVariable +err | Set-Contact -DomainController dc.contoso.com -AssistantName $_."Assistant's Name" -City $_."Business City" -Company $_."Company" -Department $_."Department" -DisplayName $display -Fax $_."Business Fax" -HomePhone $_."Home Phone" -Initials $initials -MobilePhone $_."Mobile Phone" -Name $display -Notes $notes -Office $_."Location" -OtherFax $otherfax -OtherHomePhone $otherhome -OtherTelephone $otherphone -Pager $_."Pager" -Phone $_."Business Phone" -PostalCode $_."Business Postal Code" -PostOfficeBox $postofficebox -StateOrProvince $_."Business State" -StreetAddress $businessstreet -TelephoneAssistant $_."Assistant's Phone" -Title $_."Title" -WebPage $_."Web Page" -ErrorAction SilentlyContinue -ErrorVariable +err;

}

Set-MailContact -Identity $display -DomainController dc.contoso.com -CustomAttribute15 "Import" -ErrorAction SilentlyContinue -ErrorVariable +err;

}

Add-Content c:\debug.txt $err;

Es kommt immer wieder die gleiche Fehlermeldung:

"Das Argument kann nicht an den Paramter (Name,Identity) gebunden werden, da es NULL ist."

Was heißt das genau? Wie kann ich es ändern??

Ich hoffe auf schnelle und gute Antworten :-))

/// EDIT ///

Guten Morgen,

es hat sich eine Kleinigkeit geändert.

In meiner Liste habe ich nur noch "Name" und "E-Mail Adresse" und, das Script lautet nur noch:

Import-Csv NAME.csv | ForEach { New-MailContact -Name $_.Anzeigename -ExternalEmailAdress $_.EMailAddresse }

Trotzdem kommt weiterhin die Fehlermeldung, dass das Argument nicht an den Parameter zurückgegeben werden kann, da der Wert NULL ist.

Könnt ihr mir helfen?

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.