Fix "The trust relationship between this computer and the primary domain failed" error

This is something that happens very often in large organizations with remotely connected sites (whether via MPLS nodes, connected VPNs or remote VPN users).

If you’ve spent any time in the desktop support arena you’ve likely had this error/issue dozens of times.
Here are some surefire ways to fix this fairly quickly.

MANY, many sites will tell you to remove the PC from the domain, delete the computer account and then re-join the computer. This does work – SOMETIMES and can bring on even more problems when it fails.

A simpler solution, that actually works, is to use PowerShell to resolve the issue.
You will need to log into the computer as a local administrator (or possibly you can use the cached domain admin credentials if that’s still an option)

Here are the commands to use in order of preference.

Depending on what version of Windows you are on and how up to date it is you should first download the latest Windows Management Framework (WMF). this contains the latest versions of PowerShell, DSC, WMI, and WinRM for downlevel versions of Windows and Windows Server. Here’s that link

1st try this one from an Admin Powershell:

image

Test-ComputerSecureChannel -Repair -Credential (get-credential)

After that completes restart computer and try domain login.

If that doesn’t work try this one:

Reset-ComputerMachinePassword -Server <ClosestDomainControllerNameHere> -Credential <DOMAIN\domain.admin>

Make sure to specifiy you DC and your domain user name, you’ll be prompted for you password.
The script will run and you’ll be back to the Powershell prompt.
Then just restart machine and try domain login.

An older method you can also try the NETDOM way ( most useful on some non upto date Win7 machines).
You’ll likely have to download the Microsoft Remote Server Admin Tools from here.  Install and then

use the following from an elevated cmd prompt:
netdom.exe resetpwd /s:dc-hostname.domain /ud:domainadminusername /pd:* (enter the domain admin password when prompted)

Hope this helps some.

Completely Uninstall Default Windows Store Apps in Windows 10 (8/8.1 too)

I am NOT a fan of the Windows Store or ‘Charm’ apps. If I want an application – I’ll seek out and get it myself. I don’t like being force fed a bunch of useless stuff I don’t want or need. With the advent of Windows 8 through Windows 10 MS has pushed their default/charm style applications. I use none of them. So I set out to remove them. Here is what I’ve found. Hope it helps.

If you wish to uninstall individual apps in Windows 10, run the following command in an elevated PowerShell window:

Get-AppxPackage | Select Name, PackageFullName

You will be able to see the list of all installed apps and its PackageFullName information.

image

Note down the PackageFullName and replace it in the following command:

Get-AppxPackage PackageFullName | Remove-AppxPackage

So the command to remove some of the apps will look as follows:

Uninstall 3D Builder

Get-AppxPackage *3dbuilder* | Remove-AppxPackage

Uninstall Get Office app

Get-AppxPackage *officehub* | Remove-AppxPackage

Uninstall Get Started app

Get-AppxPackage *getstarted* | Remove-AppxPackage

Uninstall Get Skype app

Get-AppxPackage *skypeapp* | Remove-AppxPackage

Etc…

Run the command to uninstall the particular pre-installed default Windows 10 Store app and then restart your computer.

If you want to uninstall the particular pre-installed app from all user accounts, use the following command format:

Get-AppxPackage -allusers PackageFullName | Remove-AppxPackage

Seems some people lost the Windows Store and wanted/needed it to get Window apps.

Another fully scripted way to remove everything BUT the Windows Store is here:

Get-AppxPackage

-AllUsers | where-object {$_.name –notlike "*Microsoft.WindowsStore*"}

| Remove-AppxPackage

Get-appxprovisionedpackage –online | where-object {$_.packagename –notlike "*Microsoft.WindowsStore*"}

| Remove-AppxProvisionedPackage –online

There are some tools available that will assist users in doing all this via a Graphic Intereface – Notably theWindowsClub’s 10AppsManager for Win10; it’s a freeware that will allow you to easily uninstall and reinstall the default, built-in, preinstalled Windows Store apps in Windows 10. It can be downloaded here.

Disable Email Accounts in Exchange

Deleting Mailbox in Exchange Admin Console will delete the attached AD objects!

Always great to find out afterwards – thank you Microsoft. :/

So….to just disable an account:

In the Exchange Management Console, right-click and select disable mailbox

or

in the Exchange Management PowerShell, use the Disable-Mailbox cmdlet:

Disable-Mailbox -Identity {mailboxname} -Confirm:$false

Disabling the mailbox will remove the Exchange attributes from the Active Directory object, which disconnects the mailbox and leaves the Active Directory object intact.

The user account will remain in Active Directory and disconnected mailbox will be purged after retention period passes.

You may also need to change a group’s ownership:

Type in the following command and replace “distribution group” with the actual group whose owner is changing.

[PS] >Set-DistributionGroup "distribution group" –ManagedBy "admin.serviceaccount@whomever.com" -BypassSecurityGroupManagerCheck

How To Share Folders In Outlook 2011/2013 For Mac

Sharing a Calendar folder in Outlook 2011 for OS/X

1.Select your calendar, and then choose “Permissions"
clip_image002

2.In the permissions window, click “Add User”, and then choose the individual for whom you’d like to assign permissions:
clip_image004

3.Once the user has been added to the list, assign the desired permissions:

Note:

To activate the greyed "Permissions" Icon, just click the name of your calendar on the left bar under "My Calendars". When "My Calendars" is selected, Permissions may greyed out. When the name of Calendar individually is selected, Permissions should now be made available.

How to remove a printer and its drivers from Windows 8/10

How to remove a printer and its drivers from Windows 8

Press the keyboard shortcut Win+q. Find Printer Management in the section Administrative Tools and launch it.

clip_image002

Removing a printer

Open Custom Filters, All Printers, select the printer you want to remove and click on Delete.

clip_image004

Confirm it by clicking Yes.

clip_image006

Removing drivers

Go to item All Drivers. If you have installed your driver from a standalone installer, it is recommend you to Remove Driver Package… . If you have simply selected the driver from a list offered by Windows when installing the printer, it is recommend you to Delete it.

clip_image008

If you are trying to remove the driver without removing the printer beforehand, or the driver is used also by another printer than the one you removed, the system won’t allow you to remove the driver.

clip_image010

If you resolved the previous problem or you haven’t encountered it, system will show you which packages and drivers will be deleted.

clip_image012

After you click on the button Delete, the packages and drivers will be erased from the system. By clicking on the button OK on the summary window, the process of removing drivers will be finished.

clip_image014

If you removed all drivers you wanted, close the Print management.

Remove Network Printers from Windows via Registry Editor

Step 1: Click on Start, Run and then type in regedit and press Enter. This will open the registry editor.

clip_image016

Step 2: Navigate to the following key in the registry:

HKEY_CURRENT_USER – Printers – Connections

Here you should now see a list of all network printers with the server name first, then a comma, and then the name of the actual printer.

clip_image018

Go ahead and click on the printer in the left menu and press the Delete button or right-click and choose Delete. Unfortunately, that’s not all! You also have to delete the printer from one more location in the registry:

HKEY_LOCAL_MACHINE – SYSTEM – CurrentControlSet – Control – Print – Providers – LanMan Print Services – Servers – Printers

Now under the servers key, you should be able to expand it and see the name of the print server that actually hosts the printer you want to delete. Go ahead and expand the print server key and delete the printer from the list.

clip_image020

Now close the registry editor and reboot your computer. The undeletable network printer should now be gone! Note that the method above is just for network printers. If you have a local printer and want to remove it the same way via the registry, you need to go to the following registry keys below:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Environments\ Windows NT x86\ Drivers\Version-3\

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Printers\

Using PowerShell to Manage Windows Updates

Using PowerShell to Manage Windows Updates:  PSWindowsUpdate

Often we have to update computers that have not – for whatever reason been updated in a long time. AND we often have to create new deploy images using sysprep. What usually happens is that Windows update will hang at ‘checking for updates’ for a very long time and either error out or never complete. A secret I found to deploying Windows Updates when this happens or from within Audit Mode is an excellent PowerShell module created by Michal Gajda. This module, aptly called PSWindowsUpdate, allows managing Windows Update on any computer running PowerShell 2.0 or higher. This module even enables Windows admins to check for and install updates on remote PCs and servers. PSWindowsUpdate is particularly handy for installing updates on Server Core machines that have no GUI, or in instances such as Sysprep’s Audit Mode where the Windows Update GUI doesn’t work.

· Get started by downloading the latest version of PSWindowsUpdate.zip.

image

· Once downloaded, extract the contents of the zip file to C:\Windows\System32\WindowsPowerShell\v1.0\Modules\.

image

Extracting files from PSWindowsUpdate.zip.

· Click Continue if a UAC prompt appears.

image

· When the files have been extracted into the PowerShell Modules folder, open an elevated PowerShell prompt. Change PowerShell’s Execution Policy to RemoteSigned. The RemoteSigned Execution Policy allows PowerShell scripts downloaded from the Internet to run on a PC as long as they are signed by a trusted publisher.

· Type Set-ExecutionPolicy RemoteSigned and press Enter. When prompted, confirm the change by pressing Y and then Enter.

image

Changing PowerShell’s execution policy

This completes the one-time configuration of the module! Now it’s time to put PSWindowsUpdate to use!

· If running PowerShell v2.0, type Import-Module PSWindowsUpdate and hit Enter. This isn’t necessary in PowerShell v3 and higher, but it doesn’t hurt anything either. This step simply guarantees that the modules cmdlets will be available to the PowerShell v2.0 session.

· Display a list of all the module’s available cmdlets by typing Get-Command –module PSWindowsUpdate and hitting Enter.

image

Using Get-Command -module PSWindowsUpdate.

· Possibly the most important function for getting and installing updates is Get-WUInstall. Help for each cmdlet is available, so to see full help for Get-WUInstall type Help Get-WUInstall –full and press Enter.

image

Looking at help for Get-WUInstall.

When applying updates, I prefer connecting to the Microsoft Update servers. Using these instead of the standard Windows Update servers allows installing updates to Office and other Microsoft products in addition to the normal Windows updates. Unfortunately, trying to connect to the Microsoft Update servers using the PSWindowsUpdate module from a fresh Windows installation will produce an error, as shown below.

image

· The reason for this error is because Windows is registered to use only the standard Windows Update servers by default. To use the Microsoft Update servers, the Microsoft Update Service must be registered on the computer. In the GUI, this is done by selecting the checkbox for Give me updates for other Microsoft products when I update Windows from the Control Panel – Windows Update – Change Settings applet.

· In the PSWindowsUpdate module, the same process is completed by using the Add-WUServiceManager cmdlet with the ServiceID for the Microsoft Update service specified. Type Add-WUServiceManager -ServiceID 7971f918-a847-4430-9279-4a52d1efe18d and press Enter. When prompted, confirm registering the service by typing Y and pressing Enter one more time.

image

Registering the Microsoft Update servers.

· List available updates from the Microsoft Update servers by typing Get-WUInstall –MicrosoftUpdate –ListOnly and pressing Enter. After a few moments, the system will return a list of the available updates for the current machine. No error this time!

image

· The same results are produced by typing Get-WUList –MicrosoftUpdate and pressing Enter.

image

· Type Get-WUInstall –MicrosoftUpdate and press Enter to go through the available updates, confirming installation of each one manually.

image

PSWindowsUpdate and Parameter Support

Another awesome feature of the PSWindowsUpdate module is its support of parameters. For example, using the –AcceptAlland the –AutoReboot parameters with the Get-WUInstall cmdlet changes the manual process into an automated one. Type Get-WUInstall –MicrosoftUpdate –AcceptAll –AutoReboot and press Enter. The system will download and install all available updates and then automatically reboot if any of the updates require a reboot.

image

Retrieving updates and installing automatically.

Don’t want a particular update to be installed? No problem! Use Hide-WUUpdate. Selection parameters such as –Title or –KBArticleID narrow in and hide specific updates. Feel free to use wildcards with these parameters. As an example, type Hide-WUUpdate –Title “Bing*” –KBArticleID “KB2673774” –MicrosoftUpdate –Confirm:$false and press Enter to hide the Bing Bar 7.3 update.

image

Hiding an unwanted update.

Notice that I used the –Confirm parameter, along with the $false switch, to automatically confirm hiding the selected update. In the future the update won’t appear when listing available updates.

Did you make a mistake and hide the wrong update? No problem! Hide-WUUpdate can unhide an update by using the –HideStatus parameter with the $false switch. To unhide the update hidden earlier, type Hide-WUUpdate –Title “Bing*” –KBArticleID “KB2673774” –MicrosoftUpdate –HideStatus:$false –Confirm:$false then press Enter. As before, I used the –Confirm:$false parameter to keep everything streamlined.

image

Unhiding a previously hidden update.

Once all the updates are complete make sure to open PowerShell (as Administrator) and set the Execution Policy back to ‘restricted’:

Type Set-ExecutionPolicy Restricted and press Enter. Then exit