Running Exchange 2010 PowerShell Scripts

Hello,
I have a PowerShell Script which calls PSSnapins for Exchange tools.  The Exchange Management Tools are installed on the Tidal Server
The Script works fine by itself, I have executed it as the tidal users on the Tidal Server. I have also created a batch file to execute the Powershell script, which also works on the tidal server.
However when I run the job in Tidal it doesn't run correctly by that I mean it will run the none Exchange pieces.  In the Output tab it shows:
Add-PSSnapin : The Windows PowerShell snap-in 'Microsoft.Exchange.Management.PowerShell.E2010' is not installed on this machine.
At E:\PowerShell\DailyChecks\Dag_daily.ps1:7 char:13
+ Add-PSSnapin <<<<  Microsoft.Exchange.Management.PowerShell.E2010
    + CategoryInfo          : InvalidArgument: (Microsoft.Excha...owerShell.E2
   010:String) [Add-PSSnapin], PSArgumentException
    + FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.Ad
   dPSSnapinCommand
Add-PSSnapin : The Windows PowerShell snap-in 'Microsoft.Exchange.Management.Powershell.Support' is not installed on this machine
These Scripts also work via Windows Task Scheduler as written  I would really like to get these to work in Tidal.  We are Tidal 5.3.1. 
Any help would be greatly appreciated.
Lee Merrill

I have struggled with a similar issue with Sharepoint snapin with performing a backup
I can give a couple of suggestions
Add snapin to default profiles
We also see a difference in 64 vs 32 bit oprerations
we had to add to both versions using a local profile.ps1 and adding a line
Add-PSSnapin "Microsoft.SharePoint.PowerShell" -ErrorAction SilentlyContinue
C:\Windows\System32\WindowsPowerShell\v1.0
C:\Windows\SysWOW64\WindowsPowerShell\v1.0
Execute remotely
Slightly different setup on our side
I am trying to invoke-command on the remote sharepoint server =
( you have to set up psremoting, etc)
Invoke-Command -ComputerName -scriptblock { E:\Backup\BackupSite.ps1}
Similarly I  can execute the backup.ps1 with no issue on the server but can't from the tidal job.
I'll let you know if we find a fix
I am thinking double hop at this point and need to trust for delegation, etc
Marc

Similar Messages

  • Exchange 2010 Powershell virtual directory recreation

    Nevermind Fixed.....
    So apparently you have to run those commands in Powershell version 2.0, Exchange 2010 doesn't like powershell 3.0
    to do that type  powershell -version 2.0
    then type the exchange commands. 

    Ok, so I opened up my IIS console today to fix a problem with Exchange and the fix was to change one of the Modules in the Powershell Virtual Directory, but when I clicked on Modules it threw an error.  So I started to try an fix that, all the forums and suggestions I read said to remove the Virtual directory and recreate it...
    My problem is recreating it, I get the following error,  I've googled and searched a lot and can't find how to fix this. 
    This topic first appeared in the Spiceworks Community

  • Hardware requirement for running exchange 2010 on vmware workstation

    Dear Team,I need to create a exchange 2010 sp2 on a guest os on vmware workstation.kindly help me out with the physical hardware requirements for a home user

    Hey Mukund26,
    Before I answer your questions, my suggestion would be for you to figure out exactly what you want to get out of running that Exchange lab.  Are you trying to learn Exchange features like DAGs?  Are you trying to learn about virtualizing Exchange?  When you figure that out you'll be better able to answer question 1 since you may not need all of those virtual machines.
    Here are my thoughts on your questions.
    1) It is probably technically possible to run 10 virtual machines on the configuration you have but you're going to have pretty bad performance. I would try to trim that down to only the virutal machines that you really need in order to use the lab how you want to use it.  Here are some questions that may help you figure out what you need:
    Why do you need two domain controllers?  I don't think you need to worry as much about redundancy in your lab. 
    Why do you need 2 ESXi hosts and a vCenter?  What purpose do they serve in this configuration?  Are you trying to run the Exchange VMs nested under the ESXi VMs?  If so, why?
    Is there a reason why you want to separate out HTS/CAS from MBX in your lab?   Combining all roles together can reduce the number of VMs you need.  If you separate out the roles you'll need to allocate a lot of RAM to support all of those Exchange VMs.
    2)  Running a lot of virtual machines on a single 1TB SATA disk, especially a 5400 RPM disk, is going to be slow.  It'll be especially painful when the VMs are booting up, rebooting, shutting down, etc..  Try to stagger the power on operations so they don't all boot at once.  For example, first boot your DCs, then boot your HTS/CAS, then your MBX, etc.   There is no doubt that configuration will be slow, so if you can get your hands on an solid state drive with enough space you'll have significantly better performance.  For the purposes of a lab, though, it is probably ok if you can be patient.
    3) I think the i5 processor will be just fine for this lab.  Usually in a lab setting CPU performance isn't the most important thing so similar to above as long as you can be a little patient I think that CPU will suit you just fine.
    As I said figure out what you want to get out of the lab and then you can determine how many VMs you need and whether or not you want to upgrade hardware.  If you're looking to learn about Exchange 2010 in general I would suggest using multirole servers, getting rid of one of the DCs, and not worrying about virtualizing ESX/vCenter so that you can learn.  If you're looking to learn about virtualizing Exchange 2010 on vSphere then let's figure out exactly what you want to get out of it and figure out what you can learn using VMware Workstation and what you really need vSphere for.
    Best of luck!
    Matt
    http://www.thelowercasew.com

  • Add Exchange 2010 Powershell Modules with Domain Controller

    Hi
    We are looking for a way to run Exchange PS cmdlets from Windows 2008 R2 DC. How can we load teh Exchange PS modules with any other server
    Thanks in advance
    LMS

    You don't need to  - you can open a remote PowerShell session from the DC to the Exchange server and run the Exchange commands remotely.  Use the following commands:
    $PsS = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri <a href="http:///powershell">http://<serverFQDN>/powershell -Authentication Kerberos
    Import-PSSession $PsS -ErrorAction SilentlyContinue

  • Lync 2010 powershell script to call a voip phone

    Hi ,
    I am trying to call from Lync to IP phone through powershell script . ...can any one help me in this regard please ...
    Thanks,
    Srini

    Hi Sean ,
    Sorry i am new to the telecom domain and terminology is a bit tough for me ... i am trying to automate a Audio call with the modality settings . 
    to some extent i have succeeded in getting the call ..with the help of documentation ...below is the code for the same ... 
    But the problem is instead of calling the contact specified , it pops up a chat window in which it again asks to transfer the call to which user ... apparently its not taking the invitees i am specifying... can you please correct me where i am going
    wrong ...Thanks in advance ... 
    # Assume assembly is installed in the default installation directory
    $assemblyPath = “C:\Program Files (x86)\Microsoft Lync\SDK\Assemblies\Desktop\Microsoft.Lync.Model.DLL”
    # Import the assembly into the PowerShell session
    Import-module $assemblyPath
    $auto = [Microsoft.Lync.Model.LyncClient]::GetAutomation()
    #Create string array of conversation invitees.
    $invitees = @(‘[email protected]’)
    # Create a generic Dictionary object to contain conversation setting objects.
    $settings = new-object 'System.Collections.Generic.Dictionary[Microsoft.Lync.Model.Extensibility.AutomationModalitySettings, Object]'
    $settings.Add([Microsoft.Lync.Model.Extensibility.AutomationModalitySettings]::StartConferenceByCallingMeAt, $true)
    $modality = [Microsoft.Lync.Model.Extensibility.AutomationModalities]::Audio 
    # Start a conversation
    $ar = $auto.BeginStartConversation($modality,`
        $invitees -as [System.Collections.Generic.IEnumerable[string]], `
        $settings -as [System.Collections.Generic.IEnumerable[System.Collections.Generic.KeyValuePair[Microsoft.Lync.Model.Extensibility.AutomationModalitySettings, Object]]], `
        $null, $null) 
    #Block UI thread until conversation is started and Conversation Window is displayed.
    $window = $auto.EndStartConversation($ar)

  • SharePoint 2010 Powershell scripting for user profile

    Please help to have a powershell script which will provide the details related to user profile service application like:
    Number of user profiles:
    Number of user properties
    Number of Organization properties
    Number of Organization profiles
    Number of Audiences
    Un compiled Audiences
    Audience Compilation status
    Last compilation time
    Synchronization schedule
    Santosh sethi

    Hi,
    If you're looking for prewritten scripts, you can check these two places:
    http://gallery.technet.microsoft.com/scriptcenter
    http://get-spscripts.com/
    You should read this too:
    http://social.technet.microsoft.com/Forums/scriptcenter/en-US/a0def745-4831-4de0-a040-63b63e7be7ae/posting-guidelines?forum=ITCG
    Let us know if you have any specific questions.
    Don't retire TechNet! -
    (Don't give up yet - 12,830+ strong and growing)

  • Customising Exchange Activesync Powershell script

    Hi All,
    I have posted a question in forum for getting the activesync logs to check who has enabled/disabled activesync in Exchange 2007 but have not got the techincal result. So I am Planning to have a script in place to enable/disable activesync and maintain a
    log to track of all changes with date and time.
    http://social.technet.microsoft.com/Forums/en-US/exchangesvradminlegacy/thread/c4f58cef-b0f1-4313-b1ea-6ad82054daaa
    Below is the script we have in place to enable/disable Activesync
    $name=Read-Host Enter the SMTP address of the account to be ActiveSync ENABLED
    $a = get-date
    set-mailbox -id $name -CustomAttribute1 'Enable'
    set-casmailbox -id $name -ActiveSyncEnabled $true -ActiveSyncMailboxPolicy 'Default - Default Policy + Encryption'
    echo $a >> c:\temp\scripts\EAS\log.txt
    get-casmailbox -id $name | ft -autosize PrimarySMTPAddress,ServerName,ActiveSyncMailboxPolicy,ActiveSyncEnabled | out-file -append c:\temp\scripts\EAS\log.txt
    get-casmailbox -id $name | ft -autosize PrimarySMTPAddress,ServerName,ActiveSyncMailboxPolicy,ActiveSyncEnabled
    I have seen many scripts in technet forum to enable or disable activesync. But I have a customise requirement.
    But my requirement is
    1. read a user to enable or disable activesync
    2. Do u want to enable or disable active sync
    3. If user wants to enable AS
       Then  below conditions
         if  AS is not enabled and if CA#1 is empty
             Enable ActiveSync and update CA#1 as Enable
        Else IF AS is enabled & CA#1 is empty/disable
             Inform like AS is already enabled for the user, but CA#1 is not updated/disable
             Do u want to update CA#1 -> If yes -> Update CA#1
        Else if AS is not enable & if CA#1 is updated as enable
             Inform like AS is not enabled for the user, but CA#1 is updated
             Do u want to enable Active sync
      Else
         inform both AS is enabled and CA#1 is updated.
    4. If user wants to disable
         then the same logic but have to disable...
    This will allow me to track admins who are enabling/disabling the requests and also will be very easy to manage AS.
    Please help me with a script or the conditons to be added in the script and let me know if we can have some good output with the below information
    1. Admin info - who has updated the AS & CA
    2. Date and time
    3. User info - whose details got updated.
    Ahmed Ali

    Please post your request in
    Script Request
    You will get answers and best solutions from many.
    Regards Chen V [MCTS SharePoint 2010]

  • Exchange 2010 - Powershell Directory

    Morning. I have googled everywhere and can't find an answer to this problem anywhere. Has anyone got an ideas??
    PS C:\> New-PowerShellVirtualDirectory -Name "Powershell" -RequireSSL:$False
    New-PowerShellVirtualDirectory : An error occurred while creating the IIS virtual directory
    'IIS://<SVR>.<Domain>.com/W3SVC/1/ROOT/Powershell' on '<SVR>'.
    At line:1 char:1
    + New-PowerShellVirtualDirectory -Name "Powershell" -RequireSSL:$False
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (<SVR>\Powershell (Default Web Site):ADObjectId) [New-PowerShellVir
       tualDirectory], InvalidOperationException
        + FullyQualifiedErrorId : 90E6376F,Microsoft.Exchange.Management.SystemConfigurationTasks.NewPowerShellVirtualDire
       ctory

    Hi,
    Please confirm if your Exchange Management Shell (EMS) and Exchange Admin Center (EAC) can be opened or work well in your Exchange server.
    If you want to reset Windows PowerShell virtual directory for default web site in Internet Information Services (IIS), please
    make sure the original PowerShell virtual directory has been deleted from the server:
    1. No PowerShell listed in IIS Manager.
    2. No PowerShell VD in ADSIEdit (CN=Configuration,DC=domain,DC=.com > CN=Services > CN=Microsoft Exchange > CN=Domain > CN= Administrative Groups > CN=(Groupname) > CN=Servers > CN=(ServerName) > CN=Protocols > CN=HTTP).
    3. Run this command from the Elevated cmd prompt -> cscript.exe Adsutil.vbs delete w3svc/1/root/PowerShell.
    If your EMS can’t be opened, then we can use Windows PowerShell Module shell to create the PowerShell virtual directory to have a try. If it doesn’t work, please collect some event logs or IIS logs in your Exchange server for further analysis.
    Regards,
    Winnie Liang
    TechNet Community Support

  • Exchange 2010 Powershell PST Export

    Is there a command that will export in bulk from csv with a column of SamAccountName just the following items to PST?
    All Calendar Items
    All Contacts
    All Tasks

    Not sure about a csv, but if you paste the contents of that column into a txt file you can make a PS script starting with a get-content, followed by a For Each loop that will run the new-mailboxexportrequest with the appropriate variables.

  • Exchange 2010 powershell calendar permissions

    I want to give user01, user02, user03, and user04 reviewer rights to user05's calendar. What is the best way to do this?  with a .csv file?
    Please explain fully.

    Dear All,
     I also use this syntax:
    Import-csv C:\user.csv | ForEach-Object{Add-MailboxFolderPermission -identity $_Samaccountname":\Calendar" -User "username" -AccessRights "reviewer"} , but isn't work.
    csv file content:
    "SamAccountName"
    "testuser1"
    "testuser2"
    I got this error:
    Add-MailboxFolderPermission : An existing permission entry was found for user: xyz.
    At line:1 char:70
    + Import-csv c:\users.csv | foreach-object {Add-MailboxFolderPermission <<<<  -identity $_Samaccountname":\Calendar" -User "[email protected]" -Acc
    essRights "Author"}
        + CategoryInfo          : NotSpecified: (0:Int32) [Add-MailboxFolderPermission], UserAlreadyExis...nEntryException
        + FullyQualifiedErrorId : 377F77B8,Microsoft.Exchange.Management.StoreTasks.AddMailboxFolderPermission
    Add-MailboxFolderPermission : An existing permission entry was found for user: xyz.
    At line:1 char:70
    + Import-csv c:\users.csv | foreach-object {Add-MailboxFolderPermission <<<<  -identity $_Samaccountname":\Calendar" -User "[email protected]" -Acc
    essRights "Author"}
        + CategoryInfo          : NotSpecified: (0:Int32) [Add-MailboxFolderPermission], UserAlreadyExis...nEntryException
        + FullyQualifiedErrorId : 377F77B8,Microsoft.Exchange.Management.StoreTasks.AddMailboxFolderPermission
    Certainly I checked and there is no permission for xyz user on testuser1 and testuser2 Calendar.
    Any help would be appreciated

  • Exchange 2010 task scheduled scripts not working if not logged on

    Hi All,
    I have done a script for Exchange 2010 and I would like to create a scheduled task for it.
    I have followed the guidance of Mike Pfeiffer's blog.
    http://www.mikepfeiffer.net/2010/02/creating-scheduled-tasks-for-exchange-2010-powershell-scripts/
    However when I set the task as  “Run whether user is logged on or not”, it only works if the user running the task is the administrator. The task is run with high privileges.
    If I do it with a service account (local admin, exchange org admin) it works only when:
    -You run the script for an interactive session of the user or a runas cmd
    -You set the Task as “Run only when the user is logged on” (and the user is logged on)
    If I run the Task as “Run whether user is logged on or not” and the user is not logged on, I get an error on the connection command "Connect-ExchangeServer -auto" (and the task hangs waiting for an answer). The transcript is as follows:
    Transcript started, output file is C:\scripts\informes\pruebasconexion.Log.txt
             Welcome to the Exchange Management Shell!
    Full list of cmdlets: Get-Command
    Only Exchange cmdlets: Get-ExCommand
    Cmdlets that match a specific string: Help *<string>*
    Get general help: Help
    Get help for a cmdlet: Help <cmdlet name> or <cmdlet name> -?
    Show quick reference guide: QuickRef
    Exchange team blog: Get-ExBlog
    Show full output for a command: <command> | Format-List
    Tip of the day #31:
    Tab completion reduces the number of keystrokes required to complete a cmdlet. Just press the TAB key to complete the cmdlet you are typing. Tab completion kicks in whenever there is a hyphen (-) in the input. For example:
     Get-Send<tab>
    should complete to Get-SendConnector. You can even use wildcards, such as:
     Get-U*P*<tab>
    Pressing the TAB key when you enter this command cycles through all cmdlets that match the expression, such as the Unified Messaging Mailbox policy cmdlets.
    WARNING: The service  () isn't running. Connecting to remote Powershell requires this service to be running.
    VERBOSE: Connecting to CAS01.XXX.es
     An internal error occurred. 
        + CategoryInfo          : InvalidArgument: (http://cas01.XX...Ver=14.1.218.15:Uri) [], PSInvalidOperationException
        + FullyQualifiedErrorId : CreateRemoteRunspaceFailed
    VERBOSE: Connecting to CAS02.XXX.es
    An internal error occurred. 
        + CategoryInfo          : InvalidArgument: (http://cas02.XX..Ver=14.1.218.15:Uri) [], PSInvalidOperationException
        + FullyQualifiedErrorId : CreateRemoteRunspaceFailed
    WARNING: The service  () isn't running. Connecting to remote Powershell requires this service to be running.
    VERBOSE: Connecting to MBX02.XXX.es
    An internal error occurred. 
        + CategoryInfo          : InvalidArgument: (http://mbx02.XX...Ver=14.1.218.15:Uri) [], PSInvalidOperationException
        + FullyQualifiedErrorId : CreateRemoteRunspaceFailed
    VERBOSE: Connecting to CAS01.XXX.es
    An internal error occurred. 
        + CategoryInfo          : InvalidArgument: (http://cas01.XX...Ver=14.1.218.15:Uri) [], PSInvalidOperationException
        + FullyQualifiedErrorId : CreateRemoteRunspaceFailed
    VERBOSE: Connecting to CAS02.XXX.es
    An internal error occurred. 
        + CategoryInfo          : InvalidArgument: (http://cas02.XX...Ver=14.1.218.15:Uri) [], PSInvalidOperationException
        + FullyQualifiedErrorId : CreateRemoteRunspaceFailed
    WARNING: The service  () isn't running. Connecting to remote Powershell requires this service to be running.
    VERBOSE: Connecting to MBX02.XXX.es
    An internal error occurred. 
        + CategoryInfo          : InvalidArgument: (http://mbx02.XX...Ver=14.1.218.15:Uri) [], PSInvalidOperationException
        + FullyQualifiedErrorId : CreateRemoteRunspaceFailed
    Failed to connect to an Exchange server in the current site.
    Enter the server FQDN where you want to connect.:
    The error message refers to a unkown "() service", but I have no clue of which service can be needed and it is working only when session is opened.
     The command I run is
    C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command ". 'c:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1';c:\scripts\informes\estado_db_dag.ps1"
    UNICAN-SdeI

    I experienced a similar symptom where the scheduled task was getting stuck in the "Running" state. I searched the web for others who have experienced this issue with scheduled tasks, and what I found is that there could be a few reasons why
    this might happen. 
    I resolved my problem by adding -NonInteractive switch before the -command parameter.
    Hope it helps...
    In my case, -NonInteractive does indeed stop the task from getting stuck in a perpetual Running state (until it times out based on the settings in scheduled task), but I was able to deduce why by using Start-Transcript and Stop-Transcript.
    Basically, the connection to Exchange is failing some reason and it sits at a prompt waiting for you to enter a FQDN for an Exchange server (same problem as the OP).  Adding -NonInteractive to the scheduled task does indeed prevent the task from getting
    stuck waiting for someone to enter a FQDN at a prompt that they cannot interact with, the script still does not execute correctly.  Essentially, adding the "-NonInteractive" switch does not fix the underlying problem of the Exchange connection
    failing.
    As far as I am able to tell, this has something do with a WinRM problem.  I'm having the same problem as the OP and am trying to troubleshoot it.  In my case, deleting the user profile for the service account does not fix the problem.

  • Exchange Powershell script gives dr Watson

    Hi,
    When running a powershell (scheduled) through a batchfile I get a dr. Watson error:
    WARNING: An unexpected error has occurred and a Watson dump is being generated:
     Operation is not valid due to the current state of the object.
    Get-ActiveSyncDeviceStatistics : Operation is not valid due to the current
    state of the object.
    At D:\Scripts\ActiveSyncExport.ps1:34 char:27
    + $Devices = $Mailboxes | %{Get-ActiveSyncDeviceStatistics -Mailbox
    $_.Identity} | ...
    +                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Get-ActiveSyncDeviceStatistic
       s], InvalidOperationException
        + FullyQualifiedErrorId : System.InvalidOperationException,Microsoft.Excha
       nge.Management.Tasks.GetMobileDeviceStatistics
    But when I run this script from the Exchange Management Shell manually it works normally.
    I tried this in the script, but that doesn't work either:
    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri
    http://casserver.ourdomain.com/PowerShell/ -Authentication Kerberos
    Import-PSSession $Session
    The servers are running Exchange 2010 SP3 with rollup 2.
    It looks like a sort of buffer overflow error.
    Does anybody know a solution?

    Hi Guys,
    this is probably due to the usual serialization / deserialization issue. Try importing the commands with
    this function script.
    Another note - try to avoid using Exchange Cmdlets in combination with ForEach-Object uses - go straight through the pipeline instead:
    $mb = Get-Mailbox | Where { "Whatever Condition you need to apply" } | Select -ExpandProperty Identity | %{ $_.ToString() }
    Get-ActiveSyncDevice | Where { $mbl -contains $_.UserDisplayName } | Get-ActiveSyncDeviceStatistics
    Otherwise you'll exceed session limits, whether on the server or not.
    Cheers,
    Fred
    There's no place like 127.0.0.1

  • Azure powershell script runs locally bu not in webjob

    I downloaded Azure commandlets locally and changed the Azure website size by just running an Azure powershell script i wrote. However, uploading it to run as a webjob on my Azure website it fails with the same errors it did locally Before installing Azure
    Powersehll. Looking in kudu I see windows powershell but no azure powershell. Do I need to install Azure powershell to my website somehow?

    Done! >And it already got some attention :)
    http://feedback.azure.com/forums/169385-websites/suggestions/7155775-add-azure-commandlets

  • Creating scheduled task to run powershell script

    Hi all,
    been following this guide on how to create scheduled task to run a .ps1 script:
    http://blogs.technet.com/b/heyscriptingguy/archive/2012/08/11/weekend-scripter-use-the-windows-task-scheduler-to-run-a-windows-powershell-script.aspx
    When I manually run this task,in the history it says success, but it doesnt work.
    The script should create a report and send me an e-mail.It works fine if i run it manually in Windows powershell or Powershell ISE.
    I cannot see that a new report have been created either.
    Anything im missing here?
    Been using same account to run it manually and the one using in task scheduler.
    thanks!
    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. Thank you! Off2work

    Hi all,
    been following this guide on how to create scheduled task to run a .ps1 script:
    http://blogs.technet.com/b/heyscriptingguy/archive/2012/08/11/weekend-scripter-use-the-windows-task-scheduler-to-run-a-windows-powershell-script.aspx
    When I manually run this task,in the history it says success, but it doesnt work.
    Try executing the same command in cmd line, do you get a different result? or does that work as well?

  • Exchange 2010 is suddenly unmanageable

    Hi --
    On a SBS 2011 box running Exchange 2010 SP2, Exchange has suddenly become unmanageable. I have no idea what happened overnight to cause this. But I've been trying to get this fixed for two hours already, with no luck.
    Nobody can open OWA. From anywhere. Including from the server itself. IE network diagnostics reveal that "The device or resource (whatever) is not set up to accept connections on port "https".
    The Exchange Management Console won't open. I get the error "The attempt to connect to http://server/PowerShell using "Kerberos" authentication failed: Connecting to remote server failed with the following error message: The WinRM client cannot process the
    request. The authentication mechanism requested by the client is not supported by the server or unencrypted traffic is disabled in the service configuration. Verify the unencrypted traffic setting in the service configuration or specify one of the authentication
    mechanisms supported by the server. To use Kerberos, specify the computer name as the remote destination. Also verify that the client computer and the destination computer are joined to a domain. To use Basic, specify the computer name as the remote destination,
    specify Basic authentication and provide user name and password. Possible authentication mechanisms reported by server: For more information, see the about_Remote_Troubleshooting Help topic."
    Opening an Exchange Management Shell results in the error:
    >>>>>>>>>>>>>>>>>>>>>>>>
    VERBOSE: Connecting to server.domain.local
    [server.domain.local] Connecting to remote server failed with the following error message : The WinRM client sent a
    request to an HTTP server and got a response saying the requested HTTP URL was not available. This is usually returned
    by a HTTP server that does not support the WS-Management protocol. For more information, see the about_Remote_Troublesh
    ooting Help topic.
        + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [], PSRemotingTransportExc
       eption
        + FullyQualifiedErrorId : PSSessionOpenFailed
    VERBOSE: Connecting to server.domain.local
    [server.domain.local] Connecting to remote server failed with the following error message : The WinRM client sent a
    request to an HTTP server and got a response saying the requested HTTP URL was not available. This is usually returned
    by a HTTP server that does not support the WS-Management protocol. For more information, see the about_Remote_Troublesh
    ooting Help topic.
        + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [], PSRemotingTransportExc
       eption
        + FullyQualifiedErrorId : PSSessionOpenFailed
    VERBOSE: Connecting to server.domain.local
    [server.domain.local] Connecting to remote server failed with the following error message : The WinRM client sent a
    request to an HTTP server and got a response saying the requested HTTP URL was not available. This is usually returned
    by a HTTP server that does not support the WS-Management protocol. For more information, see the about_Remote_Troublesh
    ooting Help topic.
        + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [], PSRemotingTransportExc
       eption
        + FullyQualifiedErrorId : PSSessionOpenFailed
    Failed to connect to an Exchange server in the current site.
    Enter the server FQDN where you want to connect.:
    <<<<<<<<<<<<<<<<<<<<<<<<
    I have checked and double-checked bindings, Kerberos settings, and a slew of other things. I have reset IIS and rebooted the server multiple times. I can't get past this. Everything referenced in the following articles was checked and verified to be as the
    articles said they should be:
    http://blogs.technet.com/b/bshukla/archive/2012/05/04/exchange-management-shell-error-500-internal-server-error.aspx
    http://technet.microsoft.com/en-us/library/ff607221%28v=EXCHG.80%29.aspx
    http://support.microsoft.com/kb/2028305
    I installed and ran the EMTshooter script referenced in http://blogs.technet.com/b/exchange/archive/2010/12/07/resolving-winrm-errors-and-exchange-2010-management-tools-startup-failures.aspx. This it what it reported:
    >>>>>>>>>>>>>>>>>>>>>>>>
    Welcome to the Exchange Management Troubleshooter!
    We recommend that you run the troubleshooter after making changes to
    IIS to ensure that connectivity to Exchange Powershell is unaffected.
    Checking IIS Service...
    Checking the Exchange Install Path variable...
    Checking the Powershell Virtual Directory...
    Checking the Powershell vdir SSL setting...
    Checking the Powershell vdir path setting...
    Checking HTTP Port 80...
    Checking HTTP Port 80 Host Name...
    Testing for errors...
    VERBOSE: Connecting to server.domain.local
    [server.domain.local] Connecting to remote server failed with the following error message : The WinRM client sent a r
        + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [], PSRemotingTransportExcep
        + FullyQualifiedErrorId : PSSessionOpenFailed
    The Exchange Management Troubleshooter successfully completed connecting to:
    server.domain.local
    Failed to connect to any Exchange Server in the current site.
    Problem found:
    Looking for error...
    These are the possible causes for this error:
    1. The default http binding has been removed from the Default Web Site. Exchange Powershell needs http to be configured
    so that the IP Address is "All Unassigned", the Port is "80", and the Host Name is "".  A common scenario for changing t
    his is if you are running multiple web sites, and attempting to set up a redirect to https://mail.company.com/owa by req
    uiring SSL on the Default Web Site, and creating another web site to do the redirect back to the SSL-enabled website. Re
    mote PowerShell requires port 80 to be available on the Default Web Site for all Internet Addresses. If you want to set
    up an automatic redirect to /owa and redirect http requests to https, you should follow the instructions located at:
    http://technet.microsoft.com/en-us/library/aa998359(EXCHG.80).aspx
    and follow the directions under the section:
    "For a Configuration in Which SSL is required on the Default Web Site or on the OWA Virtual Directory in IIS 7.0."
    2. The http binding on the Default Web Site has been modified, and the Hostname field configured. To correct this issue,
     you need to clear out the Hostname field under the port 80 bindings on the Default Web Site.
    After each error is resolved, close this window and re-run the tool to check for additional problems.
    <<<<<<<<<<<<<<<<<<<<<<<<
    However, the bindings on the Default Web site are correct (I've checked them multiple times).
    And the server's System, Security and Application logs are devoid of anything that could even begin to explain what is going on.
    And this was all working yesterday ...
    I have automatic replies to modify/remove and have no way to get to them. Outlook on the PCs won't pull up Automatic Replies, claiming that the server is unavailable. On the other hand, email is coming and going fine ...
    I need to get this fixed _now_. Does anybody know how to get to the bottom of this -- and what could have possibly happened to cause this in the first place?
    Thanks
    CL

    Hi --
    C:\Users\Administrator>winrm quickconfig
    WinRM already is set up to receive requests on this machine.
    WinRM already is set up for remote management on this machine.
    C:\Users\Administrator>winrm invoke Restore winrm/Config
    Restore_OUTPUT
    C:\Users\Administrator>winrm get winrm/config
    Config
        MaxEnvelopeSizekb = 150
        MaxTimeoutms = 60000
        MaxBatchItems = 32000
        MaxProviderRequests = 4294967295
        Client
            NetworkDelayms = 5000
            URLPrefix = wsman
            AllowUnencrypted = false
            Auth
                Basic = true
                Digest = true
                Kerberos = true
                Negotiate = true
                Certificate = true
                CredSSP = false
            DefaultPorts
                HTTP = 5985
                HTTPS = 5986
            TrustedHosts
        Service
            RootSDDL = O:NSG:BAD:P(A;;GA;;;BA)S:P(AU;FA;GA;;;WD)(AU;SA;GWGX;;;WD)
            MaxConcurrentOperations = 4294967295
            MaxConcurrentOperationsPerUser = 15
            EnumerationTimeoutms = 60000
            MaxConnections = 25
            MaxPacketRetrievalTimeSeconds = 120
            AllowUnencrypted = false
            Auth
                Basic = false
                Kerberos = true
                Negotiate = true
                Certificate = false
                CredSSP = false
                CbtHardeningLevel = Relaxed
            DefaultPorts
                HTTP = 5985
                HTTPS = 5986
            IPv4Filter = *
            IPv6Filter = *
            EnableCompatibilityHttpListener = false
            EnableCompatibilityHttpsListener = false
            CertificateThumbprint
        Winrs
            AllowRemoteShellAccess = true
            IdleTimeout = 180000
            MaxConcurrentUsers = 5
            MaxShellRunTime = 2147483647
            MaxProcessesPerShell = 15
            MaxMemoryPerShellMB = 150
            MaxShellsPerUser = 5
    C:\Users\Administrator>winrm enumerate winrm/config/listener
    C:\Users\Administrator>netstat -aon | find ":80"
      TCP    0.0.0.0:80             0.0.0.0:0              LISTENING       4
      TCP    0.0.0.0:808            0.0.0.0:0              LISTENING       4856
      TCP    192.168.214.20:80      192.168.214.20:15979   ESTABLISHED     4
      TCP    192.168.214.20:15979   192.168.214.20:80      ESTABLISHED     6336
      TCP    192.168.214.20:15980   192.168.214.20:80      TIME_WAIT       0
      TCP    192.168.214.20:15997   192.168.214.20:8014    SYN_SENT        8528
      TCP    [::]:80                [::]:0                 LISTENING      
    4
      TCP    [::]:808               [::]:0                 LISTENING      
    4856
      TCP    [fe80::adee:f7f8:e6f6:1f35%13]:80  [fe80::adee:f7f8:e6f6:1f35%13]:15926
      TIME_WAIT       0
      TCP    [fe80::adee:f7f8:e6f6:1f35%13]:80  [fe80::adee:f7f8:e6f6:1f35%13]:15973
      TIME_WAIT       0
      TCP    [fe80::adee:f7f8:e6f6:1f35%13]:80  [fe80::adee:f7f8:e6f6:1f35%13]:15978
      TIME_WAIT       0
      TCP    [fe80::adee:f7f8:e6f6:1f35%13]:80  [fe80::adee:f7f8:e6f6:1f35%13]:15982
      TIME_WAIT       0
      TCP    [fe80::adee:f7f8:e6f6:1f35%13]:80  [fe80::adee:f7f8:e6f6:1f35%13]:15984
      TIME_WAIT       0
      TCP    [fe80::adee:f7f8:e6f6:1f35%13]:80  [fe80::adee:f7f8:e6f6:1f35%13]:15989
      TIME_WAIT       0
      TCP    [fe80::adee:f7f8:e6f6:1f35%13]:80  [fe80::adee:f7f8:e6f6:1f35%13]:15990
      TIME_WAIT       0
    C:\Users\Administrator>
    PID 4 is c:\Windows\system32\ntoskrnl.exe
    PID 6336 is DataCollectorSvc.exe
    I'm still getting all the same errors.

Maybe you are looking for