VMware ESXi 6.7 – View CDP Information

Have you ever connected a VMware ESXi 6.7 host to a switch port that wasn’t tagged with the correct VLAN for the management network and you weren’t able to physically trace the network cable back to the switch? If so, you know the result is that you are unable to connect to the host. However, all hope is not lost as VMware ESXi utilizes the Cisco Discovery Protocol (CDP) to provide you with the hostname, IP address, and switch port that the VMNIC/s are connected to for the management network. With that said, below you’ll find the procedure and commands to view the CDP information.

NOTE: This example assumes you are connecting to the DCUI from an iDRAC or iLO.

  1. From the VMware Direct Console User Interface (DCUI) enable the ESXi shell (Troubleshooting Options > Enable ESXi Shell)
  2. Press Alt+F1 to enter the ESXi shell
  3. Enter the root authentication credentials
  4. Enter the following command to view the CDP information for VMNIC0: vim-cmd hostsvc/net/query_networkhint –pnic-name=vmnic0
  5. In the output verify the following information:
    • connectedSwitchPort
      • devId = “switch_hostname
      • address = “x.x.x.x
      • portID = “GigabitEthernetx/x/x
  6. Exit the ESXi shell
  7. Press Alt+F2 to enter the DCUI
  8. Disable the ESXi shell
  9. Logout of the DCUI

Lastly, more information may be found using this VMware knowledge base article.

Internet Information Services – Configure Multiple Websites on One IP Address

You may configure Internet Information Services (IIS) to host multiple websites using the same internet protocol (IP) address. This may be done by utilizing separate ports on the same IP address or through the use of host headers. In this example, we will configure host headers as it is a simpler solution than using a separate port.

Before we begin I would like to provide a list of prerequisites:

  • Specify the website domain names. In this example, we will use domain.com and website.com.
  • Create a folder path for each website. In this example, we will use C:\inetpub\sites\domain.com and C:\inetpub\sites\website.com.
  • Create an index.html file, or any other default document of your choice, in each of the directories above.
  • Edit the C:\Windows\System32\drivers\etc\hosts file on the local server or remote client to test the host header configuration or create DNS entries to resolve these domain names to the appropriate IP address. If not, the web traffic will be routed to public web servers hosting these domains.

With that said, let’s begin our configuration in IIS.

  1. On the Internet Information Services (IIS) Manager interface right click Sites and select Add Website….
  2. In the Add Website dialog box enter the Site name: and Physical path: then click OK.
  3. On the Add Website dialog box select Yes to add the duplicate binding. NOTE: We will change this next.
  4. Verify that the new website, domain.com, is not running.
  5. Right click domain.com and select Bindings….
  6. In the Site Bindings dialog box select the http binding and click Edit….
  7. In the Edit Site Binding dialog box enter domain.com in the Host name: field and click OK.
  8. In the Site Bindings dialog box click Close.
  9. Right click domain.com and select Manage Website > Start.
  10. Verify the domain.com website has started.
  11. Repeat steps 1-10 for website.com.
  12. Right click domain.com and select Manage Website > Browse domain.com on *:80 (http).
  13. Verify the web browser returns the index.html file you created for domain.com from the local server and remote client.
  14. Repeat step 13 for website.com.            

Microsoft Deployment Toolkit – Configure SQL Server Express

Microsoft Deployment Toolkit (MDT) may be connected to a Microsoft SQL Server Express database. Below you will find a step-by-step guide for configuring the database.

  1. In the Deployment Workbench navigate to the Advanced Configuration section, right click Database, and select New Database.
  2. In the SQL Server Details dialog box provide the SQL Server name:, Instance:, Port:, and Network Library:. Then, click Next.
  3. In the Database dialog box select Create a new database and provide a database name in the Database: section. Then, click Next.
  4. In the SQL Share dialog box enter a share name in the SQL Share: section. Then, click Next.
  5. In the Summary dialog box review the configuration. Then, click Next.
  6. In the Configuration dialog box verify the process completed successfully. Then, click Finish.

Microsoft Deployment Toolkit – Unable to Open the Specified WIM File

When updating the Microsoft Deployment Toolkit (MDT) you may receive the following error:

=== Making sure the deployment share has the latest x86 tools ===

=== Processing LiteTouchPE (x86) boot image ===

Building requested boot image profile.

System.Management.Automation.CmdletInvocationException: Unable to open the specified WIM file. —> System.Exception: Unable to open the specified WIM file. —> System.ComponentModel.Win32Exception: The system cannot find the path specified
— End of inner exception stack trace —
at Microsoft.BDD.Core.BDDWimFile..ctor(String wimPath, Boolean forUpdate)
at Microsoft.BDD.PSSnapIn.UpdateDeploymentPoint.UpdateBootImage(String template, String platform, String dpPath, Boolean createISO, String isoName)
at Microsoft.BDD.PSSnapIn.UpdateDeploymentPoint.ProcessRecord()
at System.Management.Automation.CommandProcessor.ProcessRecord()
— End of inner exception stack trace —
at System.Management.Automation.Runspaces.PipelineBase.Invoke(IEnumerable input)
at Microsoft.BDD.Wizards.UpdateProgress.WizardProcessing()
at Microsoft.BDD.Wizards.WizardProgress.InitiateWizardProcessing()

Since you already have the Windows ADK installed you will need to download and install the Windows PE add-on for the ADK (link here). Once the Windows PE add-on for the ADK has been installed you will be able to successfully update the MDT deployment share.

Microsoft Active Directory – Add-Computer Cmdlet

You may use the following Windows PowerShell cmdlet to add a host to a Microsoft Active Directory domain with a specific domain controller. You will need to substitute the DOMAIN parameter with the actual domain name.

Add-Computer -DomainName DOMAIN -Server DOMAIN\DC01

Microsoft Active Directory – Trust Relationship Failure with Primary Domain

If you’ve worked with Microsoft Active Directory, then it’s very likely you’ve seen the following error message while trying to login to a server or workstation using domain credentials: “The trust relationship between this workstation and the primary domain failed.”

Typically, this is resolved by removing the server or workstation from the domain then rejoining it to the domain. However, the Reset-ComputerMachinePassword cmdlet may be used to change the computer account password that the computer uses to authenticate to domain controllers in the domain. For example, you may use the following syntax: Reset-ComputerMachinePassword -Server DC01 -Credential DOMAIN\– USER. As this is an example, you’ll need to substitute the DC01 field with a domain controller in your Microsoft Active Directory domain. Additionally, you’ll need to substitute the DOMAIN\– USER field with the domain and username of a user in your Microsoft Active Directory domain.

I believe this solution is preferable due to the fact that the Microsoft Active Directory computer object continues to use the same SID, remains in the appropriate OU, and remains in any necessary groups.

More information on this cmdlet may be found here.

Notepad++ – Make Themes Visible to Non Admin Users

After install Notepad++ you may notice that the themes in the Style Configurator dialog box are only accessible to the administrator account that installed the application. If would like to make the themes available for a separate users then copy the following folder to the profile of the additional user (assuming the Administrator account was used to install Notepad++).


Amazon Web Services – Verify AWS CLI Installation

You may use the following link to receive instructions on installing the AWS CLI. Additionally, to verify the installation, navigate to C:\Program Files\Amazon\AWSCLI for x64 operating systems and C:\Program Files (x86)\Amazon\AWSCLI for x86 operating systems.

Lastly, you may verify the version of the AWS CLI using the aws –version command from a Windows Command Prompt or Windows PowerShell session.

Microsoft Windows Server 2016 – Delete Recycle Bin Items

You may use the command below from the Microsoft Windows command prompt to delete the objects in the recycle bin for all users on Microsoft Windows Server 2016.

rd /s /q c:\$Recycle.Bin

Amazon Web Services – Bootstrapping – Apache Installation

You may use the following commands to configure an Amazon EC2 instance to install and start the Apache web server upon boot. The commands should be placed in the Advanced Details dialog box during during the provisioning process of an EC2 instance.

sudo su –
yum install -y httpd
systemctl start httpd