DFS wont start after update.

DFS sometimes will give you an error after update:

Error 1068: The dependency service or group failed to start.

Some windows updates will automatically disable Remote Registry service, enabling this service will let you enable DFS service.

Custom Counter

Add the following HTML for counter objects:

[code language=”html”]
<div id="counternumber"></div>
<div id="counterstart"></div>

Add the following CSS:

[code language=”css”]
#counternumber {
font-size: 12vw;
font-family: "Lucida Console", Monaco, monospace;
display: block;
color: #ffffff;
text-align: center;
line-height: 1 !important;
#counternumber:after {
content: "";
display: block;
height: 1px;
width: 60%;
background-color: #ffffff;
margin: 1% auto auto auto;

Add the following for javascript to work the div:

[code language=”javascript”]
<script type="text/javascript">
var START_DATE = new Date("September 18, 2017 00:00:00"); // put in the starting date here
var INTERVAL = 4; // in seconds
var INCREMENT = 1; // increase per tick
var START_VALUE = 14082015; // initial value when it’s the start date
var count = 0;
/* Put in Commas */
function numberWithCommas(count) {
var parts = count.toString().split(".");
parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ",");
return parts.join(".");
/* Start Value */
/* Start ONCE on Scroll
var triggerAtY = $(‘#counterstart’).offset().top – $(window).outerHeight();
$(window).scroll(function(event) {
// #target not yet in view
if (triggerAtY > $(window).scrollTop()) {
/* Insert Start Value in #CounterNumber */
$(document).ready(function() {
var msInterval = INTERVAL * 1000;
var now = new Date();
count = parseInt((now – START_DATE)/msInterval) * INCREMENT + START_VALUE;
/* document.getElementById(‘counternumber’).innerHTML = numberWithCommas(count); */
/* Default Count Up Function */
(function($) {
$.fn.countTo = function(options) {
// merge the default plugin settings with the custom options
options = $.extend({}, $.fn.countTo.defaults, options || {});
// how many times to update the value, and how much to increment the value on each update
var loops = Math.ceil(options.speed / options.refreshInterval),
increment = (options.to – options.from) / loops;
return $(this).each(function() {
var _this = this,
loopCount = 0,
value = options.from,
interval = setInterval(updateTimer, options.refreshInterval);
function updateTimer() {
value += increment;
$(_this).html(value.toFixed(options.decimals).replace(/\B(?=(\d{3})+(?!\d))/g, ","));
if (typeof(options.onUpdate) == ‘function’) {
options.onUpdate.call(_this, value);
if (loopCount >= loops) {
value = options.to;
if (typeof(options.onComplete) == ‘function’) {
options.onComplete.call(_this, value);
$.fn.countTo.defaults = {
from: 0, // the number the element should start at
to: 100, // the number the element should end at
speed: 500, // how long it should take to count between the target numbers
refreshInterval: 100, // how often the element should be updated
decimals: 0, // the number of decimal places to show
onUpdate: null, // callback method for every time the element is updated,
onComplete: null, // callback method for when the element finishes updating
/* Custom Count Up Variables */
jQuery(function($) {
from: 14082015,
to: count,
decimals: 0,
speed: 500,
refreshInterval: 1,
onComplete: function(value) {
/* Insert Final Countup in #CustomerNumber */
window.setInterval( function(){
count += INCREMENT;
document.getElementById(‘counternumber’).innerHTML = numberWithCommas(count);
}, msInterval);
var counter = 0;
$(window).scroll(function(event) {
console.log(‘I\’m expensive’, $(window).scrollTop(), ++counter);

[WP-Coder id=”1″]

Helpful Docker Commands

List all docker containers:

[shell]docker ps -a[/shell]

List docker container names:

[shell]docker ps –format "{{.Names}}"[/shell]

List docker images names:

[shell]docker images -a[/shell]

Stop all running containers:

[shell]docker stop $(docker ps -aq)[/shell]


Get docker space commands.

1.1 Get diff size

[shell]du -sh /var/lib/docker/aufs/diff/[/shell]



NOTE: Anything previous to 1.13 does not use garbage collecting. If docker runs out of space, try the commands below.

1.1 Remove exited containers:

[shell]docker ps –filter =exited -aq \ | xargs -r docker rm -v[/shell]

1.2 Remove unused docker images:

[shell]docker rmi $(docker images | grep "none"\ | awk -F’ ‘ ‘{print $3}’)[/shell]

1.2a Remove orphaned docker volumes

[shell]docker volume rm \ $(docker volume ls -qf dangling=true)[/shell]

1.3 Remove dead containers:

[shell]docker ps –filter status=dead -aq \ | xargs -r docker rm -v[/shell]

1.4 Remove intermediate containers generated during docker build:

[shell]docker ps -a | grep "/bin/sh -c" | awk -F’ ‘ ‘{print $1}’ | xargs docker rm[/shell]

1.5 Remove Image with <none> string:

[shell]echo "Remove docker images with <none> string"
if docker images | grep none | tee; then
docker rmi $(docker images | grep "none" | awk -F’ ‘ ‘{print $3}’) | tee

Docker Garbage Collection Version 1.13.0:

[shell]docker system prune[/shell]

Create Local User – Powershell

Get Local Users:


Create Local User:

$Password = Read-Host -AsSecureString

New-LocalUser “NEW_ACCOUNT_NAME” -Password $Password -FullName “USER_FULL_NAME” -Description “Description of this account.”

Add to Group:

Add-LocalGroupMember -Group “Administrators” -Member “NEW_ACCOUNT_NAME”


Enable Remote Admin (non-Domain)

Add computer to ETC/Hosts

Management Host

Get authentication server allow values.

[powershell](Get-Item wsman:localhost\client\trustedhosts).value[/powershell]

Note: This command is needed if you want to fix Kerberos authentication errors.

[powershell]Set-Item wsman:localhost\client\trustedhosts TESTMACHINE -Concatenate -Force[/powershell]

To remove, you need to clear the trustedhosts and re-add each host.

[powershell]Clear-Item WSMan:\localhost\Client\TrustedHosts[/powershell]

Remote Host

Allow UAC

Get Policy:

[powershell](Get-ItemProperty -Path ‘HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System’).LocalAccountTokenFilterPolicy[/powershell]

Install Policy:

[powershell]New-ItemProperty -Name LocalAccountTokenFilterPolicy -path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System -propertyType DWord -value 1[/powershell]

Enable Firewall Rules for Remote Managment

[powershell]netsh firewall set service type=remoteadmin mode=enable
netsh advfirewall firewall set rule group="remote administration" new enable=yes[/powershell]

Enable MMC

[powershell]netsh advfirewall firewall set rule group="Windows Management Instrumentation (WMI)" new enable=yes
netsh advfirewall firewall set rule group="Remote Event Log Management" new enable=yes[/powershell]

Enable Fireall Rules for Remote Disk Management

[powershell]netsh advfirewall firewall set rule group="Remote Volume Management" new enable=yes
((( PowerShell – Run on Both Side)))
Set-NetFirewallRule –Name “RVM-VDS-In-TCP” –Enabled True -Profile Any
Set-NetFirewallRule –Name “RVM-VDSLDR-In-TCP” –Enabled True -Profile Any
Set-NetFirewallRule –Name “RVM-RPCSS-In-TCP” –Enabled True -Profile Any[/powershell]

Create Domain User – Powershell

Create new Domain User:

New-ADUser -SAMAccountName “testuser” -DisplayName “Test User” -AccountPassword (ConvertTo-SecureString -AsPlainText “testpassword” -Force)

Force Change Password on Logon:

Set-ADUser -Identity “testuser” -ChangePasswordAtLogon $true

Reset Password:

Set-ADAccountPassword -Identity “testuser” -Reset -NewPassword (ConvertTo-SecureString -AsPlainText “testpassword” -Force)

Get Members in Groups:

Get-ADGroupMember -Identity “Domain Admins”

Add Members to Groups:

Add-ADGroupMember -Identity “Domain Admins” -Members testuser
Add-ADGroupMember -Identity “Administrators” -Members testuser
Add-ADGroupMember -Identity “Schema Admins” -Members testuser
Add-ADGroupMember -Identity “Enterprise Admins” -Members testuser
Add-ADGroupMember -Identity “Administrators” -Members testuser

Get Memberof:

Get-ADPrincipalGroupMembership “testuser”

How to install Active Directory in Windows Core

Install Domain Services

install-windowsfeature AD-Domain-Services

The -WhatIf command allows a preview of the Powershell command before execution. Remove after testing.

Install a Forest Active Directory

Install-ADDSForest -CreateDnsDelegation:$false -DatabasePath “C:\Windows\NTDS” -DomainMode “Win2012R2” -DomainName “[Parent_Domain].com” -DomainNetbiosName” [Parent_Domain]” -ForestMode “Win2012R2” -InstallDns:$true -LogPath “C:\Windows\NTDS” -NoRebootOnCompletion:$false -SysvolPath “C:\Windows\SYSVOL” -Force:$true -WhatIf

Install a Tree Active Directory in the forest domain:

Install-ADDSDomain -NoGlobalCatalog:$false -CreateDNSDelegation:$true -Credential (Get-Credential) -DatabasePath “C:\Windows\NTDS” -DomainMode “Win2012R2” -DomainType “ChildDomain” -InstallDNS:$true -LogPath “C:\Windows\NTDS” -NewDomainName “[Child_Domain]” -NewDomainNetBIOSName “[Child_Domain]” -ParentDomainName “[Parent_Domain].com” -Norebootoncompletion:$false -SiteName “LV1” -SYSVOLPath “C:\Windows\SYSVOL” -WhatIf

Fortigate login with RADIUS Authentication

Prerequisite: Install NPS Client on a Windows Server.

Setup NPS Radius Client and create a Shared Secret and keep this key for later.

Create a new Connection Request Policy.

In the Conditions tab add the IPv4  address of the firewall.

In the Settings tab add Vendor-Specific | RADIUS Standard, we will add 2 values.

In this example Firewall_Admins is the RADIUS connection User Group and the Admin_Access is a VSA 6 (Vendor Specific Attribute with a String of 6) admin login profile.

Create a new Network Policy – Authentication.

In Conditions create a Windows User Group or add a group that will access the firewall.

In Constraints add the authentication methods.

This completes the Windows RADIUS side of installation.

Login to the Fortigate and setup a RADIUS server connection.

Setup the RADIUS servers with the values that match your RADIUS server. I called mine RADIUS-Connection.

You can test connectivity and confirm success.

Go to User Groups and add a new group. Mine is called Radius_Admin.

Add the Remote Group from above with the Remote Server name and called the group name Firewall_Admin.

NOTE: The Group Name needs to match the RADIUS server!

Under Admin Profiles create a new profile and name it Admin_Access.

NOTE: The Profile Name needs to match the RADIUS server!

Now create a new administrator and give the Administrator Profile and Remote User Group the same options as above.

Now test the login!

If you are unable to login then test by enabling debugging and send an authentication request.

diag debug enable
diag debug app fnbamd -1
diag test authserver radius <server_name> <chap | pap | mschap | mschap2> <username> <password>



Steps to move SendSuite Live to new SQL Server

If a database move is needed for SendSuite® Live, please contact software support for assistance. The complete installation will be reviewed for complexity and depending on the results, the work may be performed by the software support desk or a Change Request may be submitted.

Environment Details
Products affected: SendSuite® Live

Internal Notes
Run the below SQL script against the SendSuite live database once it has been successfully restored.
USE [SendSuite Live]
SET @NewServer = ‘SendSuiteLive-qa’
SET @OLDServer = ‘SendSuiteLive-test’
UPDATE DataSources SET DBLinkedServerName = @NEWServer, DBServerName = @NEWServer WHERE DBLinkedServerName = @OLDServer
NOTE: ‘NewServerName’ should be replaced with the name of the new SQL server and ‘OldServerName’ should be replaced with the name of the old SQL server.

After restoring ConnectShip database, launch Progistics Management Console.
a. Under the Enterprise section, Update the Controller Configuration Data to reflect the new database server and credentials, then click on the Test button to verify connectivity can be establish with the database on the new SQL server. Save the changes by clicking on the “Save” button.
b. Under the Server Component section, click on one of the Server Components, then click on the Transaction Data tab, select the newly created Database connection string from the pull-down, then click on the Test button to verify connectivity can be establish with the database on the new SQL server. Save the changes by clicking on the “Save” button.
NOTE: These steps must be performed on both the Transaction Data tab and the Configuration Data tab for each Server Component.

STEP 3 – Update Server Configuration Utility
Launch Server Configuration Utility
If the “Server Setting” section is not expanded, click on the “+” sign next to it and expand the “Server Settings” section.
Expand the SQL Section by clicking on the “+” sign
Update the below fields with the new SQL Server information
. SQL Password
. SQL Server
. SQL User
Click on the “Apply Clear” button.
Click on the “Close” button

STEP 4 – Only needs to be done if the country codes are not loading for the Projects
Open Internet Explorer and launch SendSuite Live Projects Administration
Click on the Project Administration tab
Highlight the project missing the country codes
Click on the Project Design tab
Once the Project Datasources have finish loading, click on the Ship link in the bottom left hand pane
Once the Page Design View has loaded, left click on the ShipToCountry list box and go to Data properties
Note: The following error message might appear “An error has occured in the VDPEClient component: Subscript out of range – From_load”, if it does just click the “OK” button.
Click on the List Options tab. Click on the “Configure New” button
Select Microsoft SQL Server and click the “Next” button
Select the new SQL Server and enter credentials
Select SendSuite Live Database
Highlight the “Address Codes” table from Available Tables and Views window then click on the Limit Tables and Views button
Highlight the “Address Codes” table and click on the “OK” button.
Click on the “Next” button
Click on the “Finish” button
Configure the below option in the bottom window.
a. Check the “Text” box for the field Name
b. Check the “Order by” box for the field Name
c. Check the “Value” box for the field Code
d. Type 1 in the “Where the field equals” box for the field Type ID
Click on the “OK” button
Click on the “Save Changes” button
Once the changes have been saved, perform an iisreset
Close browser
Launch Internet Explorer load the Project

HyperV Core SSL Replication without GUI

Created a bonded NIC (optional):

[shell] Get-NetAdapter New-NetLbfoTeam "NIC Team" –TeamingMode SwitchIndependent [/shell]

If you need to add a VLAN:

[shell] Add-NetLbfoTeamNic -Team "Lan Team" -vLanID 10 -Name "Management VLAN" [/shell]

Enable ping:

[shell] netsh firewall set icmpsetting 8 enable [/shell]

Enable HyperV to HyperV host communiations:

[shell] Enable-Netfirewallrule -displayname “Hyper-V Replica HTTPS Listener (TCP-In)” [/shell]

Enable file and printer sharing:

[shell] netsh advfirewall firewall set rule group=”File and Printer Sharing” new enable=Yes [/shell]

Pre-requisite: Download and install WinSDK, this can be installed as a GUI. We only need the Tools package under Windows Native Code Development.

To run as admin:

[shell] runas /profile /user:AAA “C:\programs\BBB.exe” and press “Enter” [/shell]

Installed package will be at C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\makecert.exe, we need to CD into that directory.

NOTE: The following commands are all minus, if you use dash the commands will fail!

On the Primary HyperV Host:

[shell] makecert -pe -n “CN=HyperV-PrimaryRoot” -ss root -sr LocalMachine -sky signature -r “HyperV-PrimaryRoot.cer” [/shell]

[shell] makecert -pe -n “CN=HYPERV-PRIMARY.DOMAIN.COM” -ss my -sr LocalMachine -sky exchange -eku, -in “HyperV-PrimaryRoot” -is root -ir LocalMachine -sp “Microsoft RSA SChannel Cryptographic Provider” -sy 12 HyperV-Primary.cer [/shell]

On the Replicated HyperV Host:

[shell] makecert -pe -n “CN=HyperV-BackupRoot” -ss root -sr LocalMachine -sky signature -r “HyperV-BackupRoot.cer” [/shell]

[shell] makecert -pe -n “CN=HYPERV-BACKUP.DOMAIN.COM” -ss my -sr LocalMachine -sky exchange -eku, -in “HyperV-BackupRoot” -is root -ir LocalMachine -sp “Microsoft RSA SChannel Cryptographic Provider” -sy 12 HyperV-Backup.cer [/shell]

Copy the created Root certificate files to each others hosts folder and we will need to add the cert to the certificate store.

To add a cert run:

[shell]certutil -addstore -f Root "ReplicaTestRootCA.cer"[/shell]

Run the following commands to update the registry:

[shell]reg add “HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\FailoverReplication” /v DisableCertRevocationCheck /d 1 /t REG_DWORD /f[/shell]

[shell]reg add “HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization\Replication” /v DisableCertRevocationCheck /d 1 /t REG_DWORD /f[/shell]