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++).

C:\Users\Administrator\AppData\Roaming\Notepad++\themes


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.

#!/bin/bash
sudo su –
yum install -y httpd
systemctl start httpd


Microsoft Windows PowerShell – Get DHCP IPv4 Scope Details

The Windows PowerShell cmdlet below will query a remote Dynamic Host Configuration Protocol (DHCP) server and provide the lease duration of each IPv4 scope.

Get-DhcpServerv4Scope -ComputerName HOSTNAME | Select ScopeID, LeaseDuration


Microsoft Active Directory – Computer Object Password

You may use the following Windows PowerShell cmdlets to view the last time an Active Directory (AD) computer object reset it’s password for all of the computer objects in an AD domain or an individual computer object in an AD domain.

Get-ADComputer -Filter * -Properties PasswordLastSet | Select Name, PasswordLastSet | Sort-Object Name, PasswordLastSet | Format–List
Get-ADComputer -Filter ‘Name -EQ “<<<HOSTNAME>>>”‘ -Properties PasswordLastSet | Select Name, PasswordLastSet | Format-List


Microsoft Windows Server 2016 – Print Server Migration

Windows Server 2016 allows you to export printers using the Printer Migration utility. Upon exporting the existing printers you may use the following command, from the C:\Windows\System32\spool\tools\ directory, to import them.

.\PrintBrm.exe -r -f <<<PATH_TO_IMPORT_FILE>>>