Monitoring Windows Server Backup with Check_MK (Server 2008 R2)

Below Powershell script will monitor Windows Server backups with Check_MK. Prerequisits: Before starting – You must install Windows Server Backup Features Command Line Tools. To do this, open up Server Manager and go to Features > Add Features In the Add Features menu, expand “Windows Server Backup Features” and ensure “Command-Line tools” is enabled, if Read more about Monitoring Windows Server Backup with Check_MK (Server 2008 R2)[…]

Removing a Computer from the Domain (Copying Profile)

This is a guide to remove a computer from a  Windows domain, while copying the previous domain account on the computer to a local one. Creating Local accounts The first steps will be to create two new local accounts, one a local account for the user of the computer and one temporary administrator account we Read more about Removing a Computer from the Domain (Copying Profile)[…]

Installing Windows XPS Viewer on Windows 10 1803

There have been many different issues caused by the latest 1803 update to Windows 10 from Microsoft. The latest I have come across is the XPS viewer dissapearing. Luckily the fix for this is a quick one-liner command from an elevated (Run as adminsitrator) Command Prompt: dism /Online /Add-Capability /CapabilityName:XPS.Viewer~~~~0.0.1.0 If you get error after Read more about Installing Windows XPS Viewer on Windows 10 1803[…]

System Volumes visible after updating to Windows 10 1803

A number of my clients have reported since updating to Windows 10 release 1803 that new disks have appeared in on their Computer (Eg D:\) which were not there before the update. These are typically System disks that manufacturers set up so you can easily reinstall your computer to factory defaults. The standard process of Read more about System Volumes visible after updating to Windows 10 1803[…]

Basic Git commands

Cloning a Repository To clone a repository into a subfolder of your current directory (Eg if you are in /git the repository will be cloned to /git/[repository name]) run the below: git clone [email protected]:project/repository.git Cloning a Repository to a specific directory To clone a repository into a specific directory (Eg /git/example in the below) run Read more about Basic Git commands[…]

Using Node Version Manager (NVM)

Installing NVM Download link: https://github.com/coreybutler/nvm-windows/releases (nvm-setup.zip) Download and extract nvm-setup.zip Run the installer Installing particular versions of node Open up a CMD window on your machine and run a command as below (Adjusting depending on what version you require) nvm install 0.10.28 Using a particular Node version one-off To use a particular Node version just for the Read more about Using Node Version Manager (NVM)[…]

Handy Active Directory Powershell Scripts

Find User password expiry date Get-ADUser -filter {Enabled -eq $True -and PasswordNeverExpires -eq $False} –Properties “DisplayName”, “msDS-UserPasswordExpiryTimeComputed” | Select-Object -Property “Displayname”,@{Name=“ExpiryDate”;Expression={[datetime]::FromFileTime($_.“msDS-UserPasswordExpiryTimeComputed”)}} Find Locked accounts Search-ADAccount –LockedOut Find Users with Password Never Expires Get-ADUser -filter {Enabled -eq $True -and PasswordNeverExpires -eq $True} | FT Name Find password set date for enabled users Get-aduser -filter {Enabled -eq Read more about Handy Active Directory Powershell Scripts[…]

Filtering Security logs by account name (Active Directory)

Open up Security logs on the Domain Controller Select ‘Filter Current Logs’ on the right hand side Select the XML tab at the top and enter the below XML (Updating with the Username that you require) <QueryList> <Query Id=”0″ Path=”Security”> <Select Path=”Security”>* [EventData[Data[@Name=’TargetUserName’]=’USERNAME’]]</Select> </Query> </QueryList>

Reducing LDF size in SQL Server 2008 R2

Open SSMS Right click the database in question and select ‘Properties’ Go to “Options” on the left Change the line “Recovery Model:” from Full to “Simple” and hit OK Take a full backup of the database Right click on the database again, go to Tasks – Shrink – Files Under File Type: select Log and Read more about Reducing LDF size in SQL Server 2008 R2[…]