Send PowerShell Script to Exchange 2013

Hello everyone,
can I send a shell command to the Exchange Server, if I catch the Outlook Session via VB/C#?
Best regards
Vi

You'll have to be much more specific about where exactly you get stuck and what you are trying to achieve.
Also, you might be better off posting this in the developer forum down the hall instead:
http://social.msdn.microsoft.com/Forums/en-US/outlookdev/threads
Robert Sparnaaij
[MVP-Outlook]
Outlook guides and more: HowTo-Outlook.com
Outlook Quick Tips: MSOutlook.info

Similar Messages

  • F5 Big IP 4000 Send /Return String for Exchange 2013

    Hi,
    I need to Implement F5 Big IP 4000 and need to set send / return string for Exchange 2013 server for OWA monitoring... Can anyone help me with Exact output String.
    Amit

    Hi,
    In the Send String box enter in GET /owa/healthcheck.htm.  In the
    Receive String box, enter in 200 OK.
    Here is a related article for your reference.
    http://port25guy.com/2013/07/24/how-to-use-managed-availability-in-exchange-2013-with-your-load-balancer/
    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make
    sure that you completely understand the risk before retrieving any suggestions from the above link.
    Hope this is helpful to you.
    Best regards,
    Belinda Ma
    TechNet Community Support

  • Semi-Automated granting send on behalf rights - Exchange 2013/Exchange Shell

    Hi all,
    We have just upgraded to Exchange 2013 and currently cant set mailbox permissions via the Exchange Admin Center, we currently have to do it via Exchange Shell.
    Thats all fine but i would like to automate it so my team can run a script and get prompted to enter the target mailbox and the user's id.
    Im new to ExchangeShell/PowerShell so be gentle with your feedback, but this is what I have come up with:
    $RemoteEx2013Session = New-PSSession -ConfigurationName Microsoft.Exchange ` -ConnectionUri  ` -Authentication #-Credential (Get-credential)
    Import-PSSession $RemoteEx2013Session -AllowClobber
    $mailboxname = Read-Host "Please enter name of mailbox"
    $UserID = Read-Host "Please enter name of user"
    $output = set-mailbox $mailboxname -GrantSendOnBehalfTo $UserID
    When I run it I get "Insufficient access rights to perform the operation", I get what that means but if I manually type the command it works i.e    set-mailbox john.smith -GrantSendOnBehalfTo Jane.Smith
    Questions are: Is this possible to semi-automate this via powershell, and am i totally of track with the above commands?
    Thanks in advanced 

    Hi,
    According to the error message, it seems there is no proper permission to run this script.
    Please make sure you have proper permission, I suggest run this script as Administrator for testing if you are using an additional account now.
    Also suggest creating a test user and grant proper permissions for testing.
    Thanks
    Mavis
    Mavis Huang
    TechNet Community Support

  • What are the correct Send Connectors settings in Exchange 2013

    Hi
    I'm new to exchange, successfully setup a lab with 2 cashub roles and 2 mailbox roles. I am trying to set the send connectors settings, because I've not been able to send nor receive external email via owa. Since I'm separating the exchange roles, my mailbox
    servers only use internal IP settings and cannot resolve external DNS. I'm thinking I need to tick, proxy through CAS for it to work? any suggestions?

    Hi 
    Can you please let us know what version of Exchange that you are using 
    "I'm new to exchange, successfully setup a lab with 2 cashub roles and 2 mailbox roles"
    - Because Exchange 2013 does not hold hub role.
    " I am trying to set the send connectors settings, because I've not been able to send
    nor receive external email via owa."
    It would be great if you could answer few questions so that people can help you out here
    Are you able to send emails internally without any issues with Outlook ? If not can you paste the errors.
    What error you are getting while trying to send emails through owa . Can you paste the errors.
    If you are looking for steps to create new send connector please follow below technet article
    http://technet.microsoft.com/en-us/library/aa998936(v=exchg.150).aspxFeel free to post your comments/errors you received  to proceed
    further
    Remember to mark as helpful if you find my contribution useful or as an answer if it does answer your question.That will encourage me - and others - to take time out to help you Check out my latest blog posts on http://exchangequery.com Thanks Sathish
    (MVP)

  • Enable document management for entities through PowerShell script (Dynamic CRM 2013 on premises)

    Hello,
    Can anybody let me know if it is possible to enable document management for entities through PowerShell script for Dynamic CRM 2013 on premises.
    I want power shall script where user will give the entity (Accounts, Contacts etc.)   for the CRM.
    The script should enable the document management for the entity.
    Thank you for your support.

    Hi Jeff,
    Any updates? If you have any other questions, please feel free to let me know.
    A little clarification to the script:
    function _ErrObject{
    Param($name,
    $errStatus
    If(!$err){
    Write-Host "error detected"
    $script:err = $True
    $ErrObject = New-Object -TypeName PSObject
    $Errobject | Add-Member -Name 'Name' -MemberType Noteproperty -Value $Name
    $Errobject | Add-Member -Name 'Comment' -MemberType Noteproperty -Value $errStatus
    $script:ErrOutput += $ErrObject
    $errOutput = @()
    _ErrObject Name, "Missing External Email Address"
    $errOutput
    _ErrObject Name "Missing External Email Address"
    $errOutput
    If you have any feedback on our support, please click here.
    Best Regards,
    Anna Wang
    TechNet Community Support

  • It is there an alternative to the Test-SystemHealth powershell cmdlet for Exchange 2013?

    Hello
    The Powershell cmdlet Test-SystemHealth, that was available on Exchange 2010, is no longer available on Exchange 2013.
    Test-SystemHealth cmdlet gathered data about the Microsoft Exchange system and analyzed the data according to best practices.
    Are there any alternatives to this for Exchange 2013?
    Thanks!

    Haven't really played with it too much, but check out Get-ServerHealth
    http://technet.microsoft.com/en-us/library/jj218703(v=exchg.150).aspx
    Looks to have replaced Test-SystemHealth.

  • Run powershell script against exchange using task schedule

    I want to run this using task scheduler
    Get-MailboxStatistics -Server mailserver  | Select DisplayName, ItemCount, TotalItemSize | Sort-Object TotalItemSize -Descending | Export-CSV "\\pacetoputreport\report_$((Get-Date).ToString('MM-dd-yyyy')).csv"
    I know I have to run some variation of this to launch the exchange module
    C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noexit -command ". 'C:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1'; Connect-ExchangeServer -auto"
    How can I do this in Task Scheduler? I have tried numerous times using various combinations, but nothing seems to work.
    Thank you

    You need to put the first part where you call powershell.exe in the Program/script part of the task, but the rest of it is put into the arguments section. As explained here
    http://www.msexchange.org/kbase/ExchangeServerTips/ExchangeServer2013/Powershell/scheduling-exchange-powershell-task.html (which has versions for both 2010 and 2013, but since you list V14 in your filepath I assume you're using 2010) you'd need to
    set the arguments to :
    -version 2.0 -NonInteractive -WindowStyle Hidden -command ". 'C:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1'; Connect-ExchangeServer -auto; <Your Command>"

  • Powershell Script for Exchange- Storagelimitstatus wont return any data.

    I am trying to run the following script using PowerGUI and its working but one piece. The storagelimitstatus isn't returning any data. Any impute would great.
    Here is what I wrote. 
    If (-not (Get-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010 -ErrorAction SilentlyContinue))
    {   Try { Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010 -ErrorAction Stop }
        Catch { Write-Host "Unable to load Exchange tools because ""$($Error[0])""" -ForegroundColor Red ; Exit }
    Get-Mailbox -ResultSize Unlimited | Select-Object DisplayName,IssueWarningQuota, storagelimitstatus,ProhibitSendQuota,ProhibitSendReceiveQuota,@{label="TotalItemSize(MB)";expression={(Get-MailboxStatistics $_).TotalItemSize.Value.ToMB()}}, @{label="ItemCount";expression={(Get-MailboxStatistics
    $_).ItemCount}}, Database| Export-Csv "\\pc1417\c$\Scripts\UserMailboxSizes.csv" -NoTypeInformatio

    StorageLimitStatus is a property extracted by Get-MailboxStatistics and not Get-Mailbox.Try below and check if that works!
    Get-Mailbox -ResultSize Unlimited | Select-Object DisplayName,IssueWarningQuota,@{label="StorageLimitStatus";expression={(Get-MailboxStatistics $_).StorageLimitStatus}},ProhibitSendQuota,ProhibitSendReceiveQuota,@{label="TotalItemSize(MB)";expression={(Get-MailboxStatistics $_).TotalItemSize.Value.ToMB()}}, @{label="ItemCount";expression={(Get-MailboxStatistics $_).ItemCount}}, Database| Export-Csv "\\pc1417\c$\Scripts\UserMailboxSizes.csv" -NoTypeInformation
    Pavan Maganti ~ ( Exchange | 2003/2007/2010/E15(2013)) ~~ Please remember to click “Vote As Helpful&quot; if it really helps and &quot;Mark as Answer” if it answers your question, “Unmark as Answer” if a marked post does not actually answer your
    question. ~~ This Information is provided is &quot;AS IS&quot; and confers NO Rights!!

  • CMWS CANNOT SEND EXTERNAL MAIL WITH EXCHANGE 2013

    Hi, all. i have integrated the cmws 1.5 server with exhcange 2013 mail server , now the webex can send mail to the user which in exchange, but cannot send mail to external mail server, how can i  fix this trouble? thank you.

    Hi Bin,
    Please look into exchange configuration, as it is not allowing emails from CWMS to be relayed to the Internet. This is not due to CWMS configuration.
    Thanks,
    Derek Johnson
    Conferencing TAC

  • Powershell script for Exchange Server 2010 health check

    People,
    Can anyone here please share the Powershell to check the Exchange Server health and functionality after patching and Service Pack update?
    I need to test multiple servers in my AD environment.
    Thanks
    /* Server Support Specialist */

    Hi,
    In Exchange 2010, you can use the Test-ServiceHealth cmdlet to test whether all the Microsoft Windows services that Exchange requires on a server have started.
    A related article about this command.
    https://technet.microsoft.com/en-us/library/aa998852(v=exchg.150).aspx
    You can also use the EXBPA tool to do Exchange server health check. You can look at the blog below.
    http://blogs.msdn.com/b/douggowans/archive/2007/06/06/run-your-own-exchange-server-health-check-the-tools.aspx
    Hope this is helpful to you.
    Best regards,
    If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Belinda Ma
    TechNet Community Support

  • PowerShell Scripting Question Exchange Address Lists -eq

    I am trying to set a Global Address List using Powershell. When it executes, the output does not change $custom to the actual value. It keeps '$custom'. What am I doing wrong? 
    This is my code: 
    $company = "test"
    $custom = read-host "Enter custom attribute"
    New-GlobalAddressList -Name "$company GAL" -RecipientFilter {(CustomAttribute15 -eq "$custom")} 
    I also tried:
    New-GlobalAddressList -Name "$company GAL" -RecipientFilter {(CustomAttribute15 -eq $($custom))} 

    Hi Mike,
    Try to modify the custom attribute using adsiedit 
    Start ADSI Edit.
    In the All Global Address Lists container, locate the newly created Address List.
    Open the properties of the Address List object.
    In the select a property to view list, click purportedsearch .
    Enter the LDAP query that you want to process, and then set that value.
    Click OK , and then force replication and see.
    Try to set this custom attribute for single user and check if it works for single user 
    Get-mailbox -Organizationalunit "users OU" | set-mailbox customattribute1 "$company GAL"
    Bounce the Microsoft File Distribution service and see if it does not reflect.
    Please mark as helpful if you find my contribution useful or as an answer if it does answer your question. 
    That will encourage me - and others - to take time out to help you. 
    Regards, 
    Sathish

  • Exchange 2013 co-existence with 2007 can not send from 2013 - receives OK

    2013 SP1  -separate servers for MBX and CAS - 4 of each. Exchange 2007 configured as a CCR
    I am in co-existence mode but have not yet switched on the legacy.domainname.com. I have a new certificate installed on all servers - 2007 and 2013 with the legacy namespace included
    I can receive on the exchange 2013 servers and can send to exchange 2013 users but cannot send to 2007 users or externally. I have enabled protocol logging and I'm seeing:
    2014-04-02T00:57:31.476Z,Outbound Primary,08D1120CF8FEEDBA,0,,10.0.9.1:25,*,,attempting to connect
    2014-04-02T00:57:52.521Z,Outbound Primary,08D1120CF8FEEDBA,1,,10.0.9.1:25,*,,"Failed to connect. Winsock error code: 10060, Win32 error code: 10060, Error Message: A connection attempt failed because the connected party did not properly respond after a
    period of time, or established connection failed because connected host has failed to respond 10.0.9.1:25"
    The client has a pair of Axway mailgateway appliances (Tumbleweed). We can Telnet between the exchange 2013 servers and the Axways. There is a firewall between these mail gateways and the exchange servers and the following ports were opened - 25,443,465,995,110
    I used the existing send connectors from 2007 and just added the mailbox servers to them. I created 2 new receive connectors to match 2 specialist 2007 connectors.
    But I still can't send mail. Any suggestions where next to check?

    Hi Tony 
    Based on the protocol logs error looks like there is connectivity problem between Ex2007 and Ex2013
    First you can try dropping an email through Telnet from Exchange 2013 to Exchange 2007 to see the message failure happens at which transit.
    You can add the IP address of Exchange 2013 in Exchange 2007 default receive connector and vice versa.
    Restart the transport service and try sending an email from exchange 2013 to Exchange 2007 and see the results
    Also you can try creating a dedicated receive connector for Exchange 2007 in Exchange 2013 and vice versa if the above step does not work 
    Also try disabling the firewall and see if it helps.
    Remember to mark as helpful if you find my contribution useful or as an answer if it does answer your question.That will encourage me - and others - to take time out to help you

  • SCCM 2012 SP1 and Exchange 2013 Connector Get-Recipient cmdlet failed

    I have been trying to get my Exchange Connector working with SCCM 2012 SP1 for a week or so now. Every post tells me that the Get-Recipient cmdlet failed is a security permissions error. I have given the service account running the connector full Exchange
    Server Management rights including Recipient Management and Organization View-Only. I have even tested remote power shell to the CAS server and run the cmdlet with no issues.
    For some reason it just does not want to work for me. Has anyone been running into this issue?

    Now before you read the following error and say oh this is a permission issue I am telling you it is not. I have given the account full Exchange admin rights and I have even tested the Get-Recipient cmdlet remotely to the Exchange server and it works with
    no issues. I have also noticed multiple forum posts with the exact same issues.
    I have noticed one thing that stands outs "Cannot bind parameter 'Filter' to the target. Exception setting "Filter": "The value "$true" could not be converted to type System.Boolean"
    I believe this issue may be related to changes in the powershell commands with Exchange 2013, but I do not know where or how to edit the ps1 script.
    I am getting the error below:
    ERROR: [MANAGED] Invoking cmdlet Get-Recipient failed. Exception: System.Management.Automation.RemoteException: Cannot bind parameter 'Filter' to the target. Exception setting "Filter": "The value "$true" could not be converted to
    type System.Boolean."~~   at System.Management.Automation.PowerShell.CoreInvoke[TOutput](IEnumerable input, PSDataCollection`1 output, PSInvocationSettings settings)~~   at System.Management.Automation.PowerShell.Invoke(IEnumerable input, PSInvocationSettings
    settings)~~   at System.Management.Automation.PowerShell.Invoke()~~   at Microsoft.ConfigurationManager.ExchangeConnector.Connector.Invoke(PSCommand cmd)
    SMS_EXCHANGE_CONNECTOR 9/19/2013 12:00:01 AM
    4200 (0x1068)
    STATMSG: ID=8817 SEV=W LEV=M SOURCE="SMS Server" COMP="SMS_EXCHANGE_CONNECTOR" SYS=MySite SITE=MySiteID PID=xxx TID=xxx GMTDATE=Thu Sep 19 07:00:01.653 2013 ISTR0="Get-Recipient" ISTR1="ParameterBindingFailed,Microsoft.Exchange.Management.RecipientTasks.GetRecipient"
    ISTR2="Cannot bind parameter 'Filter' to the target. Exception setting "Filter": "The value "$true" could not be converted to type System.Boolean."" ISTR3="" ISTR4="" ISTR5="" ISTR6=""
    ISTR7="" ISTR8="" ISTR9="" NUMATTRS=0
    SMS_EXCHANGE_CONNECTOR 9/19/2013 12:00:01 AM
    4200 (0x1068)
    ERROR: [MANAGED] Exception: Cannot bind parameter 'Filter' to the target. Exception setting "Filter": "The value "$true" could not be converted to type System.Boolean."
    SMS_EXCHANGE_CONNECTOR 9/19/2013 12:00:01 AM
    4200 (0x1068)

  • PowerGUI Powerpack for Exchange 2013

    Is there a powerpack that can be added to the powerGUI script editor for scripting in exchange 2013?

    Hi,
    Based on my search, currently, there is no official document about
    PowerGUI Powerpack for Exchange 2013.
    However, we can connect to Exchange server using remote shell.
    For more details about this, please refer to the following article.
    https://technet.microsoft.com/en-us/library/dd335083(v=exchg.150).aspx
    Hope this is helpful to you.
    Best regards,
    Belinda Ma
    TechNet Community Support

  • Journaling mailbox - Exchange 2013 Migrations from 2010

    hi guys
    i am about to start mailbox movement from Exchange 2010 to 2013. my setup is working fine. i have enabled journaling from Exchange 2010 and as ii found, automatically journaling rules will be reflected to exchange 2013. i had very big journaling mailbox
    and then newly created New Exchange 2010 journaling mailbox. now new journaling mailbox is configured for journaling and that also still on 2010(both Old and new journaling mailbox ), new mailx is couple of weeks old (6-8 GB) and old one is 2.6 TB. So i will
    move old one at the end .
    my questions is if i move new journaling mailbox to 2013 before start normal Mailboxes, it will cause some issues for journaling. i use premium journaling . is it okay to move journaling mailbox at the begin ?? 
    thank you
    Indunil

    Hi,
    Based on my test, journal rules will be synchronized in Exchange 2013 after you create in Exchange 2010. If you create in Exchange 2013, then the rule will be synchronized in Exchange 2010.
    And I did create a rule to send message to a Exchange 2013 jounal mailbox for Exchange 2010 users. It worked.
    So you can migrate journal mailbox to Exchange 2013 firstly based on this test.
    Best regards,
    Belinda Ma
    TechNet Community Support

Maybe you are looking for