I have the following PS1 code:-
cd $HelperPath
#----------------------------------------------
# Create configuration lists in central repository in SharePoint
#----------------------------------------------
Show-Message -Message "Step 1a: Create groups and adding users to it"
& "$HelperPath\Microsoft.Legal.MatterCenter.CreateGroups.exe" "true" $Username $Password
Now i want to add [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 before calling the .exe file,, so how the final syntax should be? for example something as follow??
Show-Message -Message "Step 1a: Create groups and adding users to it" & "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 $HelperPath\Microsoft.Legal.MatterCenter.CreateGroups.exe" "true" $Username $Password
;between the two commands[Net.SecurityProtocolType]::Tls13instead if your system supports it.Show-Message -Message "Step 1a: Create groups and adding users to it"& "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; $HelperPath\Microsoft.Legal.MatterCenter.CreateGroups.exe" "true" $Username $Passwordbut got this errorThe term '[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ;C:\c\tree\master\cloud\src\deployments\Scripts\Helper Utilities\Microsoft.Legal.MatterCenter.UpdateView.exe' is not recognized as the name of a cmdlet, function, script file, or operable program.