The User Profile Service failed the sign-in. User profile cannot be loaded.

When you try to start a remote desktop connection to a Windows computer on the domain you may get the error message: The User Profile Service failed the sign-in. User profile cannot be loaded. To enable the User Profile update Remote into the computer with a local administrator account, In Windows Explorer open the C:\Users\Default\AppData folder, […]

Add SSH key to a Jenkins Git step

To access a Git repository Jenkins can use an SSH key. To add the SSH key to the Jenkins server use the following Chef script Store the SSH key in an encrypted data bag called “keys”. { “id”: “ci_private_keys”, “ci_github_key”: “—–BEGIN RSA PRIVATE KEY—–\n…\n—–END RSA PRIVATE KEY—–“, }   Add the following to the Jenkins […]

Manage Windows Backups

To manage the Microsoft Windows Backups you can use a command line tool. Open a command prompt as administrator Show the existing backup versions Wbadmin get versions Clean up the backup disk To keep a number of latest backups and delete the rest Wbadmin delete backup -keepversions:NUMBER_OF_BACKUPS_TO_KEEP To keep the latest backup only Wbadmin delete backup […]

Chef custom resource is using the same property name as the called resource

When you create a Chef custom resource, you can call other resources including custom resources you have created. For ease of use it can be convenient to use the same property name as the called resource use. property :delay_mins,          Fixnum, default: 3 reboot ‘Hostname was changed’ do reason reboot_reason delay_mins delay_mins […]

Minimum Windows workstation setup to work with Windows servers

If you work on a Mac or Linux workstation and need to script and administer Windows servers, you need a few Windows tools. You can create a Windows Virtual Machine hosted in the free Virtual Box from Oracle. For installation instructions see Install the DevOps development tools on Windows Notepad++ Chocolatey Git AWS CLI (Amazon Web […]

NoMethodError: undefined method `exists?’ for Chef::Resource::File:Class

When you create a Chef custom resource and use the File class, you need to make slight a change in the syntax you use. In a Chef recipe you can use if File.exists?(“#{FileName}”) to check for the existence of a file. If we use the same line in a Chef custom resource, we get the […]

Migrate databases to and from AWS RDS instances

Amazon Web Services do not provide tools to migrate data to, from and between AWS RDS instances. There is a free utility that can do the job. SQL Server Management Studio (SSMS) Install Microsoft SQL Server Management Studio (SSMS), because the utility uses libraries from it. Download the installer for free from SQL Azure Migration […]