Saturday 14 March 2015

Robocopy Multithreaded Not Working

Robocopy can be tricky to use even at the best of times. Use the /MT switch to multi-thread, it's the only way you can.

You can see if it is working properly by looking at the open file handles via the MMC Shares snap-in. Hold down F5 to refresh continuously and you'll see multiple files being opened simultaneously by robocopy.

"Failed to upload file SiteStat.xml" "error code" "access denied"

With EPO you may sometimes find a repository has failed to replicate. Upon looking in the server task log, it will say:

"Failed to upload file SiteStat.xml" "error code" "access denied"

even though nothing actually changed!

You have a few options now.

First, try doing a "Replicate Now". It might work.

If it doesn't, then try recreating the repository altogether. Delete the folder it is stored in and then recreate it and reshare it once again. Then do a full repository replication (as opposed to incremental).

If that still doesn't work, try giving the epo service account full control on the folder.

None of this should be necessary, really, but that's EPO for you. Sometimes it does strange things!

How to Remotely View and Kill Processes

I am used to killing local processes via the command line using the taskkill command. There's a few ways to use it but my favored is to use the name of the process because often there are multiple instances and if you run this command repeatedly within a few seconds, you will kill them all:

taskkill /f /im nameoftheprocess.exe

If you want to do that remotely then you need the /s switch

e.g.

taskkill /s remoteservername /f /im msiexec.exe

In the above example, I'm killing the Windows installer process on a remote server.

You can read more here:

How to kill process on remote computer? - Windows Command Line

KACE K1000 Force Inventory from the Command Line

With the Dell KACE K1000 appliance, you can force an inventory very easily from the web console.

But you may have a reason to just want to do it instead from the client itself. I do this when I'm creating Managed Installations. If I install or re-install a program it can be a pain to go back to the web console and dive through the menus to the device and then force an inventory.

Instead you can run this command:

C:\Program Files\Dell\KACE\runkbot.exe

There is a final parameter depending on what you want:

runkbot 1 0 - bootstrap,
runkbot 4 0 - check in/inventory
runkbot 6 0 - managed installations and file syncs

Read more here:

IT Ninja - force inventory to run from the computer

Vlookup Replace "N/A"

With a vlookup command in Excel, you often get "N/A"s if nothing is found. These can look quite ugly.

If you want to replace them with something, you can of course copy and paste the text so that the formulas are no more. Then do a find and replace. But that means the formulas are gone and the spreadsheet is no longer dynamic i.e. it won't change as the data changes.

Better instead to use a formula, I found a good solution here:

Quick replace #N/A by 0 when vlookup

Adobe Flash Test - Flash Player Help

How to know if Adobe Flash Player has properly installed?

I found this site useful:

Flash Player Help

EPO McAfee VirusScan Update Manually To Latest DAT

Sometimes with McAfee VirusScan you find a client that simply refuses to update. Via the EPO console you can run a client task, update task. But often, this won't work either.

Luckily there is a way to manually update from the client itself. I will say, however, this is usually just a temporary fix. But at least you can get the client up to date there and then and fix the bigger problem later (maybe a firewall issue or even requires a reinstall of the program or even a rebuild of the OS in rare instances).

There is a good article on how to do this on the McAfee site:

How to manually update the DAT files for VirusScan Enterprise 8.x

You basically stop the McAfee services on the client then go to the McAfee support portal and download the zip file for the latest DAT and extract it to "C:\Program Files\Common Files\McAfee\Engine" then restart the services.

Force DHCP Nearest Site - Windows 7 Pointing To The Wrong DHCP Server

How to force DHCP to the nearest site?

This is when you have both a primary and a backup DHCP server or maybe you just have two DHCP servers with equal roles.

In our case we had primary on the main site and backup server in another country. Something happened to the primary server but it was fixed. But the clients kept connecting to the backup one.

The way it worked normally was that clients should seek from the DHCP server that gives the quickest response i.e. the nearest one. So why wasn't it working now?

Simple, because once clients have a lease, they always try to go back to the DHCP server where they got their most recent lease to try to obtain a new one.

The solution was to deactivate the scope of the backup DHCP server for the length of the lease time (I forget what the default is in Windows but I think it's 8 days). As a result, the clients couldn't obtain a new lease and looked for a new DHCP server and reverted back the the primary one (which also happens to be the nearest). After about a week, I reactivated the scope on the backup DHCP server.

Excel Keeps Highlighting Multiple Cells Instead Of One

I had an issue at work where wherever I clicked in the spreadsheet, it kept highlight more than one cell, instead of just the single cell that we are all used to.

I found the answer here:

Excel: Clicking in one cell annoyingly highlights several cells

Basically it was in the Page Layout view.

So go to the view tab at the top and change it back to Normal. Now save the document.


No idea why it does this but there you go. When someone puts it in the other view, to print a document, and leaves it like that then these kinds of things can happen!

How to View Delegated Rights of Active Directory

To be honest, I don't even remember why I looked this up. All I know is that the solution is here and is regarding being able to view the ACLs via the Active Directory Users and Computers console:

How to View or Delete Active Directory Delegated Permissions

Windows could not parse or process the unattend answer file for pass specialize

Somebody at work got this error when trying to rebuild a PC with Windows 7 with a new install that I had created. It appeared in a pop-up.

So what was the reason? Simple, it was the wrong product key in my answer file.

So I just changed the product key to the correct one. Then there were no more problems.

I made a link to all the KMS server product keys at Microsoft in my earlier post.

res ieframe.dll trusted site Security Warning Message - How To Get Rid Of It

Ever since I reset my Internet Explorer, I kept getting this annoying error any time that a site tried to refer me to another one via a link.

I just put up with it for a while until finally I got so annoyed I had to find the solution.

Very simple to fix, just go to Tools, Internet Options etc. and click enable on the option below.


Server 2008 R2 KMS Key

If you use a KMS server at work (it's basically a dedicated Microsoft licensing server on your premises, and is the opposite of using a volume license MAK key that activates over the internet) then you if you find your Windows is not activating then you may need to enter a KMS client setup key.

You can get them all here from the Microsoft site:

Appendix A: KMS Client Setup Keys

For 2008 R2 Enterprise, the key is:

489J6-VHDMP-X63PK-3K798-CPX3Y


If this still doesn't work, then your client might not know where your KMS server is. You should register it with the command:

slmgr.vbs /skms kmsserver.yourcompanydomain.com:1688
 

How To Shrink Log File In SQL Server 2005

In SQL server you get two types of files, mdf and ldf. mdf are database files and ldf are logfiles.

Where I work, we sometimes get disk space alerts and need to scrabble to free up disk space.

One good way is to shrink SQL Server logfiles. This is completely safe to do. I'm told this is not the case for mdf database files.

First, open Microsoft SQL Server Management Studio.
Second, find the database then right-click, Tasks, Shrink, Files.

The word "Files" might not be there, instead you might get a confirmation page instead. Just make sure you are shrinking the log files and not the database itself. Sometimes you have to click a drop-down.

It will basically reclaim empty space and you can free up quite a lot this way.

This is a good video that helped me when I forgot and needed to remember again in a jam!



Linux Command View Text File

Well there are a lot of ways to view a Linux file. When you don't use the command line every day you can sometimes forget!

Everybody talks about vi and most Linux exams make you learn the command.

But personally I prefer pico, it's nicer to use.

cat is also another one.

I'm Back!

I sometimes feel like I'm talking to myself but I do know I get at least some readers of this blog! :)

Although, granted, most are here for solutions to their problems than anything else.

Anyway, I'm going to post some more useful solutions to the problems I've found at work. A lot is happening in my life (career-wise) at the moment and maybe I'll share some of that shortly too.

If anyone is out there reading this, please just say hello :)

Popular Posts