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

Delete all trash in Google Voice

Delete all trash in Google Voice

I’ve have been using Google Voice since its inception in 2007. I have plenty of spam rules and other delete immediately rules.

This has all led to a massive trash folder.

Google’s method to delete the trash only allows for you to select 10 items at a time, then delete them then select another and so on. For me this was 3000 pages of crap!

I went on a search or method to empty this garbage once and for all. The responses from Google on their forums were pretty much ‘tough luck’ we’re not going to add that functionality. Even though for them that would be, programmatically, an INCREDIBLY simple adjustment.

I finally found a simple and working method!! Thought I’d share.

Here’s how to delete all Google voice messages in trash!

Install Tamper monkey extension in either Chrome or Firefox.

[I had best luck using Chrome for this instead of Firefox]

http://tampermonkey.net/

Then grab the script from here:

Download the script .zip and extract the file "gv-delete.user.js"

Then Open with text editor and copy all.

OR

Copy the entire script in the github script window.

clip_image002

clip_image004

Open Tampermonkey interface from Chrome browser (it’ll be on the tool bar)

clip_image006

Click on the ‘+’ next to the ‘Installed userscripts’

Copy over (or backspace over) any code

clip_image008

Paste the copied script into the window

clip_image010

Then press Save

Now

Navigate to your Google Voice page (stay on the Inbox – don’t go to the Trash folder) :

https://www.google.com/voice

And you’ll now see a two new buttons.

One says “Delete ALL” the other “Empty Trash”

clip_image012

Clicking on the Empty Trash will kick off the script and begin emptying all of the items in your Trash folder of Google Voice. It will take some time if you trash is large BUT it will finish. Just minimize the window and have a cup of tea or coffee or whatever.

And viola’ all gone!

Fix Facebook Annoyances.

I used to use the Firefox and Chrome extension called SocialFixer to unF**k my Facebook.
Sadly however, that extension has not been updated in some time.

I’ve found another extension that works nearly as admirably – F.B. Purity
Check it out if you’d like to wrest back control of your Facebook experience.

I can’t even post this on FB because they don’t like the plugin!!

I’ve removed so much FB crap from my feed it’s actually usable again!

Check it out. install extension, go to FBP options and start hiding (by checking) loads of annoying crap. You’ll be amazed!

SERIOUS OpenID and OAth2.0 flaw revealed

skull

Okay folks ANOTHER security issue you should be aware of.
A bug has been found in OpenID and OAuth 2.0, two authentication programs that let you log into web sites using your Google, Facebook, and other major accounts. Read here and here too

OAuth—and its alternative OpenID—let you log into sites or apps using your Google, Twitter, Facebook, or other credentials, without having to create yet another account or give the app more permission than necessary. OAuth and OpenID, in essence, authenticate you with the site or tell the site you are who you say you are and let you log in without having to enter a username and password.

For example; logging into LinkedIn you are asked if you’d like to use your Google or Facebook account credentials. Then you enter said credentials (FB or Google) and you can then get on because they then ‘authenticate/use’ your other credentials. You see this all the time on news sites and blogs – if you’d like to comment or post you’re asked for some sort of ‘authentication’ usually Google, Yahoo, Hotmail or Facebook etc..

THAT’S why I live by the mantra – use different credentials (username AND passwords) for EVERY site you login to!! AND NEVER ‘LINK’ ANY ACCOUNTS!
Though this may seem difficult given the amount of our lives that are now ‘online’ it is not that hard if you use an app/service like LastPass or KeePass. I NEVER use any ‘other’ account to login to any services – ever. Every account gets it’s own credentials. That way if one is compromised no other one will be.

Please be safe out there folks!

My current physical fitness routine(s) and some opinions and observations.

DeadliftPuppy

I recently spent some time chatting with an old friend and roommate and the conversation got around to working out and the gym. He knew I have been fairly active and into fitness from way back and asked me what I’m currently doing to stave off ‘middle age’ ‘hood. Smile He’s started going to check out some CrossFit classes and gyms. I was very encouraging and let him know that that is a good start. Heck, just walking 30 minutes a day will have marked benefits for anyone; especially those who currently do no real exercise now. He was very excited to get back into weight training (CrossFit and such) because he hasn’t done anything like that since his military service days and asked about my opinions, recommendations and what I’m doing now. And if I’d send him over my current routine. I told him I would, but I had to preface that with the fact that where I’m at has taken a little while to get to. But he could take my routine, cut down weight amounts and add some other/different excises to make it his own. Remember that as long as you do anything more than you’re doing now you’ll see benefits. I recommended he start with CrossFit classes but be careful to not over exert himself and choose his trainers/gym very carefully. But he wanted details, specifics and some of my reasoning leading to my opinions and observations.

Nearly everyone is looking for that magic pill, diet or routine that will ‘instantly’ get them fit, thin and healthily with NO WORK, SACRAFICE OR EFFORT. Guess what? No shakes, no juicing, no ‘super routine’, no pills, no machine will do that! ONLY CONSISTANT, DISCIPLINED ACTION USING PROVEN TECHNIQUES AND GOOD DIET WILL! PERIOD.

So, this is what I’ve been doing for months now to get back in top form. My strength is increasing as is my endurance strength (power over time). I’ve got some pretty bad lingering injuries that will require surgery(shoulders), probably this year, but I’m working on keeping the stresses and motions from furthering those through exercise selections and proper form. And at the same time I’m working to build supporting tissues in preparation of anticipated recovery therapies.

Here is my current routines:

I use a modified 5 X 5 lifting routine to achieve strength improvements and endurance. I lift at a given weight and over a few weeks or month and as I improve I shorten the rest period between sets.

Then I’ll go up small amount in weight every few months or so and lengthen rest; then shorten as strength increases. Rinse repeat.

I lift with high intensity and move between exercises and reps fairly quickly.

This method has been used AND proven effective for decades! Reg Park (being one of the most famous advocates long ago) and many professional (especially current MMA practitioners) and Olympic athletes use these methods. I also incorporate Tabata / HIIT work into my cardio for a real power and a good heart blast.

It’s been decades since I’ve been in the ring and haven’t sparred much in a while, but I still practice loads of techniques and do bag work in addition to my lifting and cardio. I have had plenty of real world (street and field) experiences that have proved my skills and saved my life. A few close friends and family can corroborate (or provide alibis) as needed.

Some background on my philosophy and some opinions for those that asked and reasoning for my methods:

As for the current CrossFit rage I have a few opinions. [Like any opinion many will agree and disagree. I don’t care, I’m not debating a point simply stating my view and how I arrived at it and how I use my methods. My buddy, and you too, if you’re reading this for that matter don’t have to agree or do anything.] The trademark name CrossFit arose out of many cross training workouts already used by elite athletes (and armed forces) for decades that were then updated and ‘codified’ into a fantastic movement by Greg Glassman. He got smart and trademarked and marketed the sh&t out of it. Bully for him! It’s freaking capitalism at it’s best! [damn, wish I thought of it!]. CrossFit’s basic philosophy is very sound: …"it’s a strength and conditioning program as “constantly varied functional movements executed at high intensity across broad modal and time domains,"[8] with the stated goal of improving fitness, which it defines as "work capacity across broad time and modal domains."

First, I believe that CrossFit has done more to bring true all around physical fitness – strength, power and endurance to the masses than anything in the last decade or longer! It has been the greatest introduction to having real body strength and endurance to those who might otherwise have scoffed at power lifting and ‘extreme cross training’ and the benefits of both.

Second, for someone trying to lose weight quickly and get into shape or a novice physical fitness person, CrossFit provides a great all around routine to quickly get in shape, gain some real useable strength and endurance.

Third, the benefit of having other people to workout with you and provide for encouragement and motivation can be a huge plus. Especially beginners.

Fourth, the other side…. As a guy who’s been heavily involved in physical fitness and athletic performance for nearly all my life, I worry that too many people who’ve never been fit ever, are beginning ‘extreme’ routines without having built up any underlying strength in their tendons, ligaments and bones. And then there are some not too well trained ‘trainers’ who do not know proper (read SAFE) lifting form, pushing novices way beyond their limits. Many new practitioners get ‘motivated’ to just hammer out a ‘WOD’ (workout of the day) with as heavy as weights and short as time possible without caring for proper form or safety. For a novice, safety should be the main concern so technique (form if you will) is the MOST important thing when doing compound lifting exercises. Many, out of hast lift poorly or worse dangerously, jump while too fatigues or otherwise hurt themselves because of poor attention to safety. This can be attested to by emergency room physicians seeing loads more cases of blown knees, broken wrists and wrenched backs. A very well trained trainer is a must.

Please, don’t get me wrong, I love CrossFit for bringing real training to the masses. I hope that more people get involved and see how much a difference proper weight training along with cardio and sports specific training can improve one’s health and lifestyle. CrossFit can be an HUGE asset to any regular training regime for whatever sport or goals you wish to achieve. And I highly encourage all to add it to your overall routines.

And as a buy who’s been in the E.R and had way more surgeries on broken/torn/ripped body parts than most, I surely know the dangers involved in pushing things to the limit. [Although I don’t think I got the limit switch myself. ]

I have always incorporated cross training into my physical fitness; whether it be interval speed drills, table jumping, mountain climbing, motocross, mountain biking, swimming, fighting/sparring, wrestling (jiujitsu etc.). Strength training/lifting with High Intensity Interval Training, is by far the best way to improve all around physical fitness and sports performance. BUT I train to do those things and not the other way around.

So, below a link to my current routine. [Reason for the link to the document is it changes as I add remove and improve. Smile ]

For My Current routine click here.