Resolving “Something went wrong” with OWA/ECP on Exchange 2016

The Problem

ex2013-owa-error

Scenario 1: Both web addresses work, ECP logs in but OWA gives the “Something went wrong” page after submitting credentials.

Scenario 2: Both web addresses work, OWA Logs in but ECP gives the “Something went wrong” page after submitting credentials.

Scenario 3: Both web addresses work but both give “Something went wrong” page after submitting credentials.

The Cause:

This issue is generally caused by interruption or failure of the Exchange Server 2016 (“Could not grant permissions to Discovery Management” ring any bells?) – the issue is caused as the SharedWebConfig is not copied from the originating bin folder and placed in all of the relevant locations for ECP/OWA to function.

You can confirm if this is the case by checking if the file is missing in:

OWA – C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess
ECP – C:\Program Files\Microsoft\Exchange Server\V15\FrontEnd\HttpProxy

The Resolution

The issue can be resolved with a simple bit of command line. For simplicity, I will refer to your exchange installation directory as {ExchangeDirectory} – this is C:\Program Files\Microsoft\Exchange Server\v15\ or wherever you specified in installation

  1. Launch Exchange Management Shell
  2. cd to {ExchangeDirectoy}/bin
  3. Run the following command(s) depending on your issue:

    OWA – DependentAssemblyGenerator.exe -exchangePath “{ExchangeDirectory}\bin” -exchangePath “{Exchange Directory}\ClientAccess” -configFile “{Exchange Directory}\ClientAccess\SharedWebConfig.config”

    ECP – DependentAssemblyGenerator.exe -exchangePath “{ExchangeDirectory}\bin” -exchangePath “{Exchange Directory}\FrontEnd\HttpProxy” -configFile “{Exchange Directory}\FrontEnd\\HttpProxy\SharedWebConfig.config”

     

  4. Wait for execution to complete.
  5. Ensure the file has copied

    Capture

  6. run iisreset /noforce or restart the server.
  7. You (should) now have a working ECP/OWA

Capture2   Capture3

Install Jira on Windows Server and MS-SQL

Step 1: Create a Service Account

  1. Log on to DC (If ADUC not locally available)
  2. Launch Active Directory Users and Computers
  3. Expand the forest to reveal the Service Accounts node
  4. Right Click the node and select New > UserJira1
  5. Complete the new object wizard (First Name: Jira, Last Name: Service, Logon name: srv_jira) – Next
  6. Specify a secure password and confirm. Set the account to not require a change, and never expires. – Next

    Jira2

  7. Click Finish

Step 2 Create a SQL Database

  1. Logon to SQL Server
  2. Open SQL Server Management Studio and Login
  3. Expand the Instance
  4. Expand Databases OU/Folder
  5. Right Click the Databases OU and Click New Database
  6. Give the Database a Name

    Jira3

  7. Click the Options Tab
  8. From the Collation Dropown, Select SQL_Latin1_General_CI_AI or SQL_Latin1_General_CP437_CI_AI
  9. Click OK

Step 3: Give SRV Account Permissions to Database

  1. In SQL Management Studio, go to the Security OU/Folder and right click
  2. Select New > Login
  3. Click Search
  4. Click Locations
  5. Select the relevant domain and click OK

    Jira4

  6. Enter the name of your service account in the Enter the object name to select field and click Check Names

    Jira5

  7. Select User Mapping from the Right hand pane.
  8. In the Users mapped to this login pane scroll to the database created in stage 2 and put a tick in the tick box.
  9. With the Jira Database still selected, In the Database role membership pane select:
    – Public
    – db_datareader
    – db_datawriter
    – db_owner

    Jira6

  10. Click OK

Step 4: Install Jira

  1. Logon to the Application Server where Jira is to be installed
  2. Download the Jira Installation EXE to the server
  3. Launch the Application Install EXE

    Jira7

  4. Click Next
  5. Select Custom Install (recommended for advanced users) – Click Next
  6. Specify an Installation Directory (Default is fine) – Click Next
  7. Specify Attachments Directory (Default is fine) – Click Next
  8. Check the Start Menu folder name – Click Next
  9. Select Use Default Ports (we will secure using TMG Later) – Click Next
  10. Tick the Install JIRA as a Service box – Click Next
  11. Review the settings and if correct – click Install

    Jira8

  12. Leave the Launch Jira Software in Browser option selected and click Finish

Step 5: Pair your Jira Instance with the Database

  1. When the web browser has loaded, select I’ll set it up myself
  2. Click Next
  3. Select the Built In radio button (we will associate the MsSQL Later) – Click Next
  4. Close the Browser
  5. Launch the Services.msc and stop Atlassian JIRA Service
  6. Launch Notepad as an Administrator
  7. Navigate to C:\Program Files\Atlassian\Application Data\JIRA\
  8. Open the dbconfig.xml
  9. Make the following changes:<database-type>h2</database-type>
    to
    <database-type>mssql</database-type>

    <schema-name>PUBLIC</schema-name>
    to
    <schema-name>dbo</schema-name>

    <url>jdbc:h2:file:C:\Program Files\Atlassian\Application Data\JIRA/database/h2db</url>
    to
    <url>jdbc:jtds:sqlserver://[SQLServerFQDN]:1433/[DBName];domain=[Domain]</url>

    <driver-class>org.h2.Driver</driver-class>
    to
    <driver-class>net.sourceforge.jtds.jdbc.Driver</driver-class>

    <username>sa</username>
    to
    <username>[DomainAccount]</username>
    (Note: No Domain is specified here!)

    <password></password>
    to
    <password>[domain account password]</password>

    Jira9

  10. Save changes
  11. Close config file
  12. Start the Atlassian JIRA Service
  13. Go to the Log Directory for the installation (Program files/Atlassian/Application Data/Jira/log)
  14. Open atlassian-jira.log and ensure the service started and connected to the Database successfully

Step 6: Configure your Jira System

  1. From the Start Menu select Access Jira
  2. Set the Application title: MindLink Jira
  3. Set the Mode to Private
  4. Set the base URL to the required address address you will use to access Jira
  5. Click Next

    Jira10

  6. Provide License Key and Click Next
  7. Specify the Jira Admin Credentials you wish to use and click Next
  8. Select the option to set up Email Notifications Now
  9. Specify the SMTP Settings and Click Test Connection
  10. When successfully connected – Click Finish
  11. Select English (United Kindom) [Default] – Click Continue
  12. Click Next to bypass Avatar selection
  13. Click Skip quick tour
  14. Create Projects as requires (this can be bypassed and created later if you like)

You’re done! You now have a configured functional Jira!

Disable SSH / Shell Warning on VMware Host

So, you have logged in to your vSphere Client and you notice that there is a warning symbol on your host, but not alarms have triggered and no systems seem to have fault. On investigation you see a warning telling you that SSH and/or shell are enabled on your host – but that warning icon annoys you, and you need SSH (just like was the case for me), so how do you get rid of it?

  1. Log on to vSphere (vCenter or Direct to the Host is fine)
  2. Select the Host
  3. Go to Configuration

    3

  4. Select Advanced Settings under Software

    4

  5. In the Left Hand pane, scroll down to UserVars and select it

    5

  6. In the Right Hand pane, Scroll down to the bottom and Set UserVars.SuppressShellWarning to 1

    6

  7. Click OK
  8. Magic – The warning has gone!

Using Forward Lookup Zones with Apple Devices

So this came about several times at my Job, “Why can’t I connect to the Dev server from the Mac/iPhone/iPad to test the App when I am on the Wi-Fi that is connected to our Domain” – well, the reason is this:
We have a single production domain with a W.A.P, this domain then uses Forward Lookup Zones (FLZ) to point the addresses on the dev domains to the relevant DC’s DNS. This works great in Windows, but less well in iOS/OSX so here is how to make it work!:

Forward Lookup Zones from an iPhone/iPad

  • From the Home Screen, locate and tap the Settings tile

1

  • Tap the Wi-Fi option

2

  • Tap the small blue i icon

3

  • Under ‘Search Domains’ enter the FLZ domain, mutliples can be added using ‘,’ (comma) as seperator

4

 

Forward Lookup Zones from a Mac/Macbook

  • Click the Wi-Fi icon on your taskbar

Screen Shot 2015-11-16 at 20.07.51

  • Click Open Network Preferences

Screen Shot 2015-11-16 at 19.50.00

  • Click Advanced (in the bottom right corner)

Screen Shot 2015-11-16 at 19.50.22.png

  • Click the DNS tab

Screen Shot 2015-11-16 at 19.50.41 copy.png

  • On the right hand side is a search domains column, click the + button and type the FLZ Domain, click + for each additional domain.

Screen Shot 2015-11-16 at 19.51.41.png

  • When you’re done – Click OK

 

I hope you have found this useful, feedback and Idea’s for new How-To’s is always welcomed.

Change a Virtual NIC Type using PowerCLI

Blog 3: As there is an issue with Windows Server 2012/2012 R2 and the E1000 Network Card I found myself needing to replace the NICs of all of my Server 2012 VMs to use the VMXNET3 – I didnt want to shut down my whole infrastructure so came up with this method to change them whilst online.

1 – Ensure the VM is running the Current VMware Tools

  • Log in to vSphere Client, Highlight the Host name, and select the Virtual Machines tab
  • In the Master Pane on the right, right click any of the headings and tick VMware Tools Version Status, when this column is showing ensure that the VM you need to change shows Current as its status.

status

1.1 – If VMware Tools is Out-of-Date or Not Installed – Update/Install VMware tools.

  • Right click the VM that you need to change, hover over Guest
  • Select Install/Upgrade VMware Tools
  • Follow on screen instructions

installvmwt

2 – Launch PowerCLI and Connect to Host

  • Launch PowerCLI (available here if you do not have it already)
  • Run the command to connect to your Host:

                        connectviserver [HostFQDN/IP] (and press enter)

connectvi

  • If you get a certificate warning, just wait – this is for info only
  • Enter Credentials to connect (I personally use Host Root account)

3 – Get the VM’s Guest Network address (If you use DHCP skip to step 4)

  • From CLI run the following command:

    Get-VM [VMName] | Select Name, @{N=”IP Address”;E={@($_.guest.IPAddress[0])}}

  • To return the IP of All VMs, omit the VM Name prior to the pipe.

4 – Change the Network adapter type

  • Run one of the following commands:

Specific VM:
Get-VM [VM Name] | Get-NetworkAdapter | Set-NetworkAdapter -Type VMXNET3

Catch E1000 Only:
Get-VM  | Get-NetworkAdapter -Type E1000 | Set-NetworkAdapter -Type VMXNET3

Catch All:
Get-VM | Get-NetworkAdapter | Set-NetworkAdapter -Type VMXNET3

  • (I would suggest doing a handful of VMs one at a time before doing them in bulk)
  • If Windows does not detect the change Real-Time, then the VM may require a reboot to detect the change.

Hope you’ve found this helpful!
Until next time…..

Shrink VM Disk Size via SSH

Blog 2: Today I am going to show you how to shrink the size of a Virtual Machine Hard-Drive (VMware). In this example we will be using vSphere Client and Putty (for SSH) –

Before we start:
 – We will be assuming that the VM is already powered down!
– Ensure you back up the VMDK, just in case!
– I take no resposibility if you break it!
– This walk through uses vSphere Client connected to vCenter Server

1.  Ensure SSH is enabled on the host that is hosting the Virtual Machine.

    • In vSphere Client, Select the Host and click the Configuration Tab. Under the Software heading select Security Profile and click Properties adjacent to the Services heading.

      VMSSH

 

  • In the newly presented dialogue box, scroll to SSH, and ensure that the Daemon column report “Running” – if not, click Options, and click Start under Service Commands2. Resize your Hard Disk Partition in Windows to the required size using Disk Management.

    (We will cover this in a future blog if required)

    3. Launch Putty, and connect to your host.
  • Launch Putty, input host name FQDN / IP and click Open
  • Type root, press return
  • Enter your password and press return
  • type cd /vmfs/volumes/[Datastore Name]/[VM Name]/
    (in this example my Datastore is Jump-iSCSI-A, and the VM is pwsusa)

    ssh

  • type vi [vmdk_filename].vmdk
  • To edit the size, you will need to replace the whole line with the size in (see image below) – to calulate the new size use the following formula: Desired Size (GB) x 1024 x 1024 x 1024 / 512 (ie for 60GB it would be 60*1024*1024*1024/512 = 125829120)

    ssh2

  • Press Esc and then type :wq  (this stands for Write and Quit)
  • Ensure the change has been saved by using cat [vmdkfilename].vmdk
  • If all looks good, close Putty.

3. Update the vSphere GUI by removing and Re-Adding the VM to vSphere

  • In vSphere, select the relevant VM, right click and Remove from Inventory
    (Do NOT click Delete from Disk – this Annihilates the VM)
  • Navigate to Datastores and Datastore Clusters
  • Right Click the Datastore where the VM’s files are stored, and click Browse Datastore
  • Navigate to the folder for the relevant VM, locate the .vmx file – Right Click if and select Add to Inventory

    ati

  • Follow on screen instruction to specify where to place the VM
  • Go back to Hosts and Clusters or VMs and Templates View – find the VM, Right Click and Select Edit Settings
  • Under the Hardware List, select the Hard disk and ensure the size change is reflected.

size

4. Power back up the VM and ensure change is reflected in Windows’ Disk Manager

Remove Windows.old without Disk Cleanup

This, the first blog post, is how to remove the Windows.Old folder after an in-place upgrade of your windows operating system. Traditionally you would use Disk Cleanup – but what if you do not have Disk Cleanup on your machine and you can’t afford down time!?

1. Take Ownership of the folder

  • Right click Windows.Old and select properties, then navigate to the Security tab and click Advanced. 
  • Next to Owner click Change

    change

  • Type the name of the user account that will be performing the delete, click Check Names and OK
  • The next part is Key:  Tick the “Replace owner on subcontainers and objects” box before clicking Apply, and OK

    change2

  • Once this is in place, the rest should be pretty much the same as any other folder changes

2. Add Permissions to the folder

  • Right Click the Windows.old folder and select Properties then navigate to Security. Click Edit and then in the new dialogue box, click “Add” 
  • Search for the user, as you did in section one (Type the user account, Click Check Names, and then OK)
  • Tick “Allow” for Full Control then click Apply and OK
  • Click Advanced and then select Change Permissions
  • In the dialogue box that appears, click Replace all child object permission entries with inheritable permissions from this object and click Apply, then OK

    change3

  • Click OK on all open dialogue boxes

3. Delete the folder

  • Select the Windows.old Folder
  • Hold down the shift key, and press delete.
  • When prompted, confirm that you want to delete the folder by clicking Yes

    change4