Exchange 2010
1 TopicUsing @ character in exchange powershell remoting (2010)
Hello, how can i use this: Set-MailPublicFolder -Identity Set-MailPublicFolder -Identity "CN=PF1,CN=Microsoft Exchange System Objects,DC=xxxxxxx,DC=local" -GrantSendOnBehalfTo @{add='domain\john.doe'} in vb.net? VisualStudio say error, cannot find object @{add='domain\john.doe'}. Thank you! vlci code: Dim strvalue As String = "@add=""domain\" & _username & "" Dim R2 As System.Management.Automation.Runspaces.Runspace = System.Management.Automation.Runspaces.RunspaceFactory.CreateRunspace(pConnectionInfo) R2.Open() Dim P2 As System.Management.Automation.Runspaces.Pipeline = R2.CreatePipeline() Dim scriptParams As New Command("Set-MailPublicFolder") scriptParams.Parameters.Add("Identity", strIdentity) scriptParams.Parameters.Add("GrantSendOnBehalfTo", Trim(strvalue)) P2.Commands.Add(scriptParams) Dim results As Collection(Of PSObject) = P2.Invoke() R2.Close()Solved1.3KViews0likes2Comments