From 4ddd0fe2e7fad888334b2c4ca07e39a396a1c76a Mon Sep 17 00:00:00 2001 From: Przemyslaw Klys Date: Sat, 2 Dec 2023 19:57:15 +0100 Subject: [PATCH] Add passthru --- Public/Sync-O365PersonalContact.ps1 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Public/Sync-O365PersonalContact.ps1 b/Public/Sync-O365PersonalContact.ps1 index a16d09d..66947b8 100644 --- a/Public/Sync-O365PersonalContact.ps1 +++ b/Public/Sync-O365PersonalContact.ps1 @@ -30,7 +30,8 @@ [string[]] $UserId, [ValidateSet('Member', 'Guest', 'Contact')][string[]] $MemberTypes = @('Member'), [switch] $RequireEmailAddress, - [string] $GuidPrefix + [string] $GuidPrefix, + [switch] $PassThru ) Initialize-DefaultValuesO365 @@ -46,6 +47,8 @@ $ExistingContacts = Get-O365ExistingUserContacts -UserID $User -GuidPrefix $GuidPrefix $Actions = Sync-InternalO365PersonalContact -UserId $User -ExistingUsers $ExistingUsers -ExistingContacts $ExistingContacts -MemberTypes $MemberTypes -RequireEmailAddress:$RequireEmailAddress.IsPresent -GuidPrefix $GuidPrefix -WhatIf:$WhatIfPreference - $Actions + if ($PassThru) { + $Actions + } } } \ No newline at end of file