Windows 2008: Task Scheduler causes account lockout when policy locks account after one attempt

I encountered a very odd issue where I was attempting to amend a scheduled task on a Windows 2008 R2 server. When attempting to amend to a “service” account it locked out immediately. This account has a policy where it is locked out if the password is incorrect once. After several attempts and having to unlock the account every time, we spotted that every time a task was changed two event log entries were added instead of one.
It turns out the Task Scheduler in Windows 2008/2008 R2 was causing this, it first attempts to login with a blank password and then a second attempt is made with the valid password.
This causes the below (An error has occured for task . Error message: The following error was reported: 2147944309.) as the first attempt locks the account out.

The Event Log also has the following entries

Rather annoyingly the fix is no longer available, it is now included in a Convenience Rollup available from Microsoft Support. I can’t however see any mention of it in this. Thanks to Andrew Bainger from ABF for pointing me towards this.

DBForms: Check and format email addresses from Sage Line 500/1000

As the email field can sometimes not be used for the correct purpose I use a bit of code to look for an @ symbol and then a dot. If more than one email address is in I replace the comma with -t which is required by dbmailsend.
If using Sage Line 500/1000 the CustomerTable will be scheme.slcustm
I expect the DBForms def below to pickup the customer code already so there is only a lookup to the customers email address.

Remotely remove a broken user profile from another computers registry when the user folder is deleted

I recently had an issue where someone had deleted my admin user profile from a remote server by deleting its folder.
The logon then failed as Windows still expected the folder to be there, as obviously the registry entries were not removed.
Rather than manually checking HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList for the SID and then removing it WMIC can be used. A user called Tommylotmanagement posted an answer and I found it worked if the user folder profile has been deleted as well.

It should then show:
Deleting instance \\<Server>\root\cimv2:Win32_UserProfile.SID=”<SID>”
Instance deletion successful

If it fails check the file c:\windows\temp\wmic.err in a text editor.

Credit: Tommylotmanagement

I have also found this has worked to correct issues where accounts keep generating TEMP or TEMP. folders.

Using current versions of Server! as a Cisco UC Backup Server

For anyone who has had the annoyance of trying to backup a Cisco Unity Communications based server to a Windows based server, you will know how annoying it can be.
I recommend Server! and it has a how to for its older version of Server!. They have obviously changes it to a web based program in newer versions.

The new version is similar in that there is a one click setting in General Security Settings

This basically sets the server to use the SSH File Transfer Protocol Version 3

Everything else from the article applies such as the username and folder structure, so ensure you read the rest of the article from “Now that you have properly configured Server! as a backup target for Cisco UCM, you have to properly configure your UCM side too”

Amend an SCCM NTFS USB flash drive for the Microsoft Surface 3 (Non Pro)

Microsoft Surface 3’s for some reason don’t support mounting USB Flash drives mounted as NTFS from its UEFI/BIOS and have to be FAT32.
Either reformat the USB flash drive as Fat32 and copy back the image (Windows Command Line currently only supports FAT32 to NTFS conversion, not the other way around), third party software needs to be used to keep data in place such as Rufus. This was also recommended by the IT shared service centre where I work and worked perfectly for every Surface 3 device we had.

With a faulty drive stop Windows from mounting

Credit: A Video from Linus Tech Tips reminded me of a way to stop Windows 7/10 from automounting drives

If you have an issue with a hard drive (That is spinning up, doesn’t sound like its head is craching/clicking and a SMART tool like CrystalDiskInfo Standard edition shows its healthy) that simply appears to hang your machine/take forever to mount, Windows can annoy you by attempting to mount drives. Windows can be told not to mount new drives so it can be told to not mount and forget older external drives which were plugged in.
This is useful if you want to drive and image the drive with software (If you don’t have a stand alone duplicator).

Autoscrub disable means you don’t have to modify the windows registry.
Automount scrub means you don’t have to remove the device from device manager (Often a pain with lots of external drives)

Obviously afterwards re-enable to restore default functionality

Georgia Telnet or SSH generate a list of users for GS_L_User.txt

Georgia Telnet can restrict the number of users that connect to Telnet or SSH.
I am lazy so I tend to generate a list based off our user logon scripts folders, however I do of course take a backup and test it afterwards.

Additional information:
Georgia Telnet Manual and Logon Features

Creating a shortcut to a non existent location on Windows

Credit: ServerFault
Credit: Craig Tolley
I came across the need to create a shortcut to a non existent file share (Where a wireless network had a different ip range on a different site). I thought Windows would let shortcuts for SMB shares be created if they didn’t exist, but Windows 10 insisted the share had to exist before being created.
ServerFault has a nice little VBS script (Although it created the shortcut, when run it didn’t close the Microsoft Script Host program. I just closed the command prompt window after)

The forum post shows it has been run on Windows 7, I have run this on Windows 10 Enterprise 64 Bit 1607 and created the shortcut on the desktop

After finding another use for the code I ran into an issue adding parameters to the shortcuts.
I wasn’t aware “Arguments” can be used, Craig Tolley has a nice post on how it is used.

Disable Word Press from allowing saving of the username and password from the login screen

A plugin which isn’t in the Word Press list of available plugins is one I find very handy from Benjamin Uzelac.
It disables Word Press from allowing the browser to save the username and password and that’s it.
Its good for complying with the usual website tests, which flag saving a username and password as a high vulnerability (Like Qualys).
For some reason it states Author “Nobody” and was applied by a third party agency. The author has a file to download in the comments as well in their link below (I recommend using this ratheer than below, I just want to keep it in case it disappears).

Link: Benjamin Uzelac
Its simply create a folder in the plugin directy like “disable-login-autocomplete”, create a php file with a name like “disable-login-autocomplete.php” and copy the code from below, upload it to the plugin folder.

Use T-Sql to find triggers on specific database

Credit: Joe Stefanelli on Stack Overflow

I wanted a simple way to find triggers on a specific database, Joe Stefanelli posted SQL which did exactly what I wanted.