Friday, April 26, 2019

Azure VPN Client not working on Windows 7 and Windows 8.1

I was working on an issue with a client who was not able to connect to an Azure VPN. He was getting the following error message:


The connection was prevented because of a policy configured on your RAS/VPN server. Specifically, the authentication method used by the server to verify your username and password may not match the authentication method configured in your connection profile. Please contact the Administrator of the RAS server and notify them of this error. (Error 812) For customized troubleshooting information for this connection, click Help.


After doing some extensive research, I found out that TLS 1.2 needs to be enabled on the workstation for it be able to connect.

In order to fix this issue, you will need to add the following registry keys:

reg add HKLM\SYSTEM\CurrentControlSet\Services\RasMan\PPP\EAP\13 /v TlsVersion /t REG_DWORD /d 0xfc0

reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\WinHttp" /v DefaultSecureProtocols /t REG_DWORD /d 0xaa0 if %PROCESSOR_ARCHITECTURE% EQU AMD64

reg add "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Internet Settings\WinHttp" /v DefaultSecureProtocols /t REG_DWORD /d 0xaa0

You will also need to install the following patches:
Then you will need to reboot the PC and you should be able to connect to the VPN.

Friday, April 19, 2019

How to see what iSCSI targets are connected to a CentOS Host

I was working on a server after there was an outage on the storage system which was a iSCSI QNAP NAS.

I did a little Google searching and found this command which worked wonderfully

iscsiadm -m session

This will give you a list of all of the devices connected via iSCSI, including the IP Address of the device you are connecting to.

Hopefully, by documenting this I will be able to remember it when I need it in the future. 

If you found this helpful, please share it with your friends, and if you are interested in some of the hardware mentioned in this post, please check the affiliate links below. 



Friday, April 12, 2019

How to convert VMDK from Thick to Thin Provision

As I have stated in a previous post, I have been trying to help out on the VMware Community Forum. One of the threads that I was able to help out on was how to convert a VMDK from thick to thin.

I have had the opportunity to do this several times in the past, but I have never needed to document. I was able to do a step by step procedure from memory for the thread, but I figured doing an actual guide might be helpful to someone else. 

The first thing that you need to realize is that the VM you want to change from Thick Provision to Thin MUST be powered off before you can convert it. 

Launch the VMware vCenter Converter Standalone Client software.

Click on the Convert Machine button.


That will launch the Converter wizard


By Default  the Source machine will be set to Powered on VM. You will need to select the Powered off radio button which will give you to option to select VMware Virtual Machine. 

Enter the Server Name or IP address, Username, and Password for the Source system and click Next


This will cause the Wizard to do a check against the Source machine to make sure that the credentials are able to access the vCenter server. 


Once you are logged in, will see the your vCenter server and ESXi hosts. Click on the vCenter server, or ESXi Host to see all the VMs that are available. 


Select the Powered off VM you wish to convert to thin provisioned and click Next. 


Next you will need to enter the Server Name, User name and Password for the destination host. Before you ask, yes the source and destination host can be the same server, however the Virtual Machine name will need to be different. 

Click Next to Continue


As I mentioned above, you will need to give the Virtual Machine a unique name, otherwise vCenter gets pretty mad. 

Select the Data Center you would like to put the VM on and click Next. 


Select the Host, Datastore, Virtual Hardware Version, and click Next.

NOTE: You should probably pick a different datastore that the one you used before, just to make sure that you don't run out of space. 


This will take you to the Options screen which is where you are allowed to change the Virtual Disk from Thick to Thin. 


Click Edit as seen in the screen below.


This will bring up the disk configuration for this Virtual Machine.


Click on the drop down under Type and change it from Thick to Thin and then click Next.


You will then be presented with the Summary screen which you can review, and then click Finish to start the conversion. 


 As you can see the Job gets submitted and will run until it completes successfully


Once it completes you will see in vCenter that there is a new Virtual Machine and if you check the settings of that Virtual Machine the VMDK will be Thin Provisioned. 

Thank you for stopping by, and I hope you found this post helpful and please check back later for more updates. 

Tuesday, April 9, 2019

How to connect to Exchange Online with PowerShell

I realized that my previous post might have been confusing about how to connect to Exchange Online. So I wanted to do a post on how you can connect to Exchange Online Using PowerShell.

First things first, because some of the scripts that you will need to run are not native to your machine, you will need to run this command, probably as an administrator before you can try to connect.


Set-ExecutionPolicy RemoteSigned


Next you will need to set your login credentials. This account needs to have administrative privileges in Exchange Online for it to Connect:


$UserCredential = Get-Credential

This will bring up a Office 365 login prompt. Enter your username, then your password and when it is done the screen will close and you will be back in PowerShell

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection

Lastly you will need to run this command
Import-PSSession $Session -DisableNameChecking

Which will enable several commands that are now available to you.

I hope that this guide helps you, I know that I always forget how to do this so doing a Blog post should help. 

Please feel free to share with your friends if you think it will help them. 

Friday, April 5, 2019

Office 365 Hybrid - Shared Mailboxes Created in Exchange Online do not appear to users whose mailboxes exist on local Exchange

I have been working on an Hybrid Exchange Solution using Office 365. The Client has several shared mailboxes and I wanted to see if a Shared Mailbox created in Office 365 would appear for users who have not been migrated.

Long Story short, the answer is no, they cannot. The reason for this is actually pretty simple. Anything created in Office 365 is not assigned a GUID by Active Directory (because we are only doing a unidirectional sync) so Exchange does not have any record of it.

 It turns out however, that if you migrate the mailbox to the On Premise Exchange server a GUID can be assigned.

I found this Article on Microsoft's support site on how to do it:
https://support.microsoft.com/en-us/help/3129334/users-in-a-hybrid-deployment-can-t-access-a-shared-mailbox-that-was-cr

Here is the process that you would need to follow in order to get it to work

Please note, the website says that you do not need to do this if your are running Exchange 2016 CU 10 or later. The Client was running 13 at the time, however these steps did work.

  1. Convert the shared mailbox to a regular mailbox by using the Exchange admin center in Exchange Online. To do this, follow these steps:
    1. Open the Exchange admin center in Exchange Online.
    2. Click recipients, and then click shared.
    3. Select the shared mailbox, and then click Convert.
    4. On the Warning page, select Yes to convert the shared mailbox.
  2. Create an on-premises object for the cloud mailbox by using the New-RemoteMailbox cmdlet in the Exchange Management Shell.

    Note This object must have the same name, alias, and user principal name (UPN) as the cloud mailbox.
  3. Set the ExchangeGuid property on the new on-premises object that you created in step 2 to match the cloud mailbox. To do this, follow these steps:
    1. Connect to Exchange Online by using a remote session of Windows PowerShell.
    2. Use the Get-Mailbox cmdlet to retrieve the value of the ExchangeGuid property of the cloud mailbox. For example, run the following command:
      Get-Mailbox <MailboxName> | FL ExchangeGuid 
    3. Open the Exchange Management Shell on the on-premises Exchange server.
    4. Use the Set-RemoteMailbox cmdlet to set the value of the ExchangeGuid property on the on-premises object to the value that you retrieved in step 3b. For example, run the following command:
      Set-RemoteMailbox <MailboxName> -ExchangeGuid <GUID>
  4. Wait for directory synchronization to occur. Or, force directory synchronization.
  5. Make sure that the Office 365 user object is displayed as "Synced with Active Directory."
  6. Move the mailbox from Exchange Online to the on-premises environment.
  7. Convert the mailbox to a shared mailbox by using the Set-Mailbox cmdlet in the Exchange Management Shell. For example, run the following command:
    Set-Mailbox <MailboxName> -Type Shared
  8. Move the mailbox from the on-premises environment to Exchange Online.
I hope you found this guide helpful, and if you do please tell your friends.

I have moved!!!

Please check out my new blog which now contains all my old posts and some new goodies as well.  I can now be found at http://www.kenbshinn.c...