Skip to content

Commit 68f3a34

Browse files
author
Peter Schulz
committed
Update to sample
Updated to include support for adding to the shared address book
1 parent ee7c865 commit 68f3a34

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Samples/CreateUsers.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Add-PSSnapin ShareFile
2+
$sfClient = New-SfClient
23

34
#The import file would typically be an exported contact list from Outlook or equivalent
45
$contacts = Import-Csv .\Contacts.CSV
@@ -19,6 +20,6 @@ foreach ($contact in $contacts)
1920
$user.Company = $contact.Company
2021

2122
#create client user
22-
Send-SfRequest $sfClient -Method POST -Entity Users -Body $user
23+
Send-SfRequest $sfClient -Method POST -Entity Users -Body $user -Parameters @{"addshared" = "true"}
2324
}
2425
}

0 commit comments

Comments
 (0)