Featured
Welcome to my site!

Welcome to my site!

I created this site for two reasons. First to have my resources somewhere other than just on my computer. Secondly to post it so that maybe someone else may find something useful in what I post. It’s pretty much whatever I feel like sharing. I’m rearranging things at the moment so the posts are a little slim. But I will be adding more as I recollect things.

Useful information about HP DL 380 g7

Useful information about HP DL 380 g7

My virtualization server at home is an HP DL 380 generation 7. It has two Intel® Xeon® E564 (2.40ghz hexa-core processors) 96 GB of ram, and currently has 16 146GB drives in a raid 5 setup giving me a little over 2TB of space.

It currently has Windows Server 2016 Installed on it.

So here’s some information which I felt I should share on this computer. So that if by chance you come here via some google link searching issues with this machine maybe some of these things I’ve learned will help you. As I learn more I will update this post. In some cases with regards to issues I am trying to figure some out, with others it’s probably not with the time.

 

So here we go.

Operating Systems

  • As I have stated this machine is currently running Windows Server 2016. It runs fine on it without issues. When I received it there was Windows Server 2012 R2 on it, which worked fine as well. With tests it seems that anything windows work work great on this machine.
  • As far as the VMWare. I tried installing 6.5 on it and got a purple screen. When I looked it up it seemed like this was an issue. 6.0 I got the standard version to work fine. There’s a HP custom image and that seemed to fail for me.
  • With regards to linux. I got Proxmox hypervisor installed on it fine, same with Ubuntu, Centos, Debian

Hardware

  • First off this thing seems to only like HP hardware. Anything else and you’re asking for trouble. I tried installing stuff from other companies this included hard drives and what ends up happening is the fans go nuts and instead of a nice quiet server you get a jet preparing for take off. This happen even when installing drives from an external sas that weren’t HP.
  • If you’re replacing or adding a bay be extra careful. There’s not alot of space to connect cables and tighten screws. I found it very easy to break something off the backplane.
  • With hyper-v virtual machines you have to turn off vmq (Virtual Machine Query) on the nic adapters. I had an issue where my virtual machines would lose their network connection all the time. I did this and it seems to have went away.

This is it for at least the time being. I’ll post more as I go along.

List of

List of

List of Useful ISOs for technicians

The original list is from projectdp on reddit, the original post is here.

I’ve updated some of the links and added some stuff of my own.

Antivirus:

Diagnostics LiveCD’s:

Forensics:

Linux Distros. Standard:

Multiboot ISO’s and tools:

Repair focused LiveCD’s:

Security:

Sysadmin related:

Resources to build this list:

Software for cloning a hard disk

Software for cloning a hard disk

This is just a simple post that I figured I’d do one part committing things to memory another part sharing the info.

So over the weekend I had a hard drive that I needed to replace in a laptop. It was a 1 tb drive that was experiencing issues. Crystal Disk Info was saying the drive was bad. So I went through my pile and found the only drive I had was a 250gb drive, which was perfectly fine for me. Plus I only had 30gb of data on the drive.

So I used my default cloning program EaseUS Todo Backup Free which has always worked correctly for me. However of course that has always been on a drive that was smaller going to one of the same size or bigger. Well I started doing my clone of the drive and while at first it looked promising it ended up failing. Even when I clicked the box saying it was going to an ssd it failed.

So before deciding to just install the new drive and do a fresh install I decided to look around.

That was when I found AOMEI Backupper this is another free piece of software. Well I tried this program to do the same thing and sure enough it worked fine. Checked out the system afterward and everything is right as rain.

Now while I’m sure if I played around with EaseUS Backup I would have probably been able to get it going, but it was much simpler to find Aomei which worked without any issues.

So just thought I’d share.

Fitness How To & Assessment Videos

Fitness How To & Assessment Videos

I’ve been starting to collect fitness related videos that I watch from time to time to both learn some new things as well as make sure I’m reminding myself from time to time on how to do things correctly.

Because on one hand I like to do things correctly, but on the other hand when the weight is heavy I have cheated.

So I figured I’d post my links in case anyone finds a use for them.

Squat Related Videos

How to Low Bar Squat With Mark Rippetoe | The Art of Manliness

The Front Squat with Mark Rippetoe

How DEEP should you SQUAT? | The ‘Perfect’ Squat Depth

Hip Socket Self-Assessment

Hip Extension Assessment

Quick Hip Assessment for Squatting

Deadlift Related Videos

How to Deadlift With Mark Rippetoe | The Art of Manliness

How to Fix Common Deadlift Technique Errors with Andy Baker

The RDL with Mark Rippetoe

Which Deadlift Variation Is Best For You? | SUMO OR CONVENTIONAL?

Press Related Videos

How to Overhead Press With Mark Rippetoe | The Art of Manliness

How to Bench Press With Mark Rippetoe | Art of Manliness

 

Apps I use for fitness tracking

Apps I use for fitness tracking

So figured I’d post something a bit different. It’s been all about computer stuff lately. So I figured I’d share the apps I use to keep track of my fitness.

I use android so all these apps are in the google play store. If there are apple versions I have no clue.

Wendlerized

Wile I’m not using this app at the moment I do use it regularly. It’s honestly my favorite app. Wendlerized is based on the workout program 5/3/1, which is a powerlifting routine. When you start the program up you enter all your record lifts and then it sets up the program for you. Now you do have to add some stuff. This routine includes just the 5/3/1 part and there are variations of the program. But you can add the variations easy enough. Then honestly you can just follow the program. There are some tweaks you can do in the settings as well. What I like about this app is that it’s free and there’s no ads or things you don’t need.

FitNotes – Gym Workout Log

This is my current workout application. There are no premade routines with this app. It’s honestly nothing more than a log and timer. But it does a great job. You can set whatever program you want into the app, set different lengths of times for each exercise, and then just enter what you are doing. It tells you when you’ve broken records even for different levels. So say if you lift 180 for 8 for the first time it counts that as a record. You lift 190 for 7 for the first time in the same workout and it will tell you that as well incase you’re pushing different rep schemes. Of course like Wendlerized there are no ads on this program either.

7 Minute Workout

This is a pretty new app to my collection, but I like it. It’s really for times I want to get my heart rate up. Like the name says it’s a 7 minute workout that will have you doing jumping jacks, push ups, squats, etc. with 10 seconds of rest in between. You can tweak some of the settings, but why would you do that? Unless you’re wanting to make it harder. You can even have it repeat. If you got a death wish try 3 sets of these and you’ll be toast. There’s once again no ads on this.

Intervaly 2.0 – Interval Timer, No Ads!

I don’t think I need to mention the no ads part do it? Ok I did. This is my go to interval timer. You can set up multiple timers based on whatever your doing. Then start it up and it will tell you when to go and when you stop. All with beeps so you know when you’re getting close to a start or stop time.

Google Fit – Fitness Tracking

This app comes installed on most android phones to my understanding. It allows you to track pretty much everything. If you walk with your phone it tracks how long you walked, which is good when you walk alot in your job, you can also enter workouts, weight, set goals, etc.

Simply Being Guided Meditation

Ok here’s where I go off the deep end. I like to take 15 minutes a day and zone out. And I’ve used this app for a while now. At first I kind of needed it. But now I barely hear anything the lady is saying other than it’s time to come back to reality. Now I know this is a paid app, but it was a ok buy for me. It’s a very simple app that just does what it’s supposed to. You can change the time, music, volume, etc.

And that’s it for the moment. I’ve used a bunch of other apps in the past, but for now these are my go tos. However if I add more I’ll update this post in the future.

Patch My PC Scheduled Task

Patch My PC Scheduled Task

This Program has recently had an update that makes the process I posted here obsolete. So I decided to redo the post with the new instructions.

 

One of the programs I love is Patch My PC. First off alot of the programs I use can be updated by it. Secondly updating with it is easy. It’s pretty much open the and click update.

However when you have to maintain a bunch of computers, all on different networks, locations, etc. It can be a pain to update all the computers.

 

Well the original post had a solution of creating a batch script that would force the update, but now it’s much simpler.

First just open the Patch My PC program. Might be good to store this somewhere other than the downloads folder.

You’ll see the scheduler button on the main screen. Just click it and you’ll be brought to the next screen.

.

Now You can either go with the suggested time, or tweak the schedule to your liking. I tend to do the settings show because I like not seeing things, and for it to do it in the middle of the night.

One other thing I do is I go into options and click these two check boxes.

That way it will automatically close the program before it updates and deletes desktop shortcuts, because I hate them. Now you can do what you want as far as those settings go. And in all honestly if you leave things open you might not want to close all programs before update.

 

Now another thing to keep in mind. You should occasionally open Patch My PC just to see if there’s any other cool software you can install, but if you do this correctly you shouldn’t have to worry about manually updating again.

 

 

More Powershell Scripts

More Powershell Scripts

So I’ve been working on a couple of scripts lately to basically go through log files. See at work we have log files pretty much for everything our Point of Sale system does, and while I’m sure at some point we will delete them for now the owner wants them all kept. So I’m using these two scripts basically. I’m sure they can be combined into one script, but I’m not that good at powershell yet, and while I’ve had time to tweak and test these two scripts I really don’t have the time to combine them. So for now they’re separate, and maybe at one point I’ll combine them.

First one I’ll put up I a sort script. Basically what this does it takes an input and an output destination. Then it will take the files in the input and move them to the output directory and will put them in folders based on the year and month they were created.

#This script is designed to take files in a folder and then sort them and put them into folders based on their creation date.


$srcFolder = "C:\input"
$targetFolder = "C:\output"

$files = Get-ChildItem -Path $srcFolder -include *.* –Recurse 

foreach ($file in $files){
	try{
		$path = $file.FullName
		$shell = New-Object -COMObject Shell.Application
		$folder = Split-Path $path
		$file1 = Split-Path $path -Leaf
		$shellfolder = $shell.Namespace($folder)
		$shellfile = $shellfolder.ParseName($file1)
		
		#0..287 | Foreach-Object { '{0} = {1}' -f $_, $shellfolder.GetDetailsOf($null, $_) }
		#32 CameraMaker,#12 DateTaken,#30 CameraModel
		
		$dateTaken = $shellfolder.GetDetailsOf($shellfile, 12)
			
		if([string]::IsNullOrWhiteSpace($dateTaken)) {    
			$parseDate =[datetime]$file.CreationTime  
		} 	
		else{
			#http://stackoverflow.com/questions/25474023/file-date-metadata-not-displaying-properly
			$dateTaken = ($dateTaken -replace [char]8206) -replace [char]8207
			$parseDate =[datetime]::ParseExact($dateTaken,"g",$null)
		}
		
		$year = $parseDate.Year	
		$monthNr = "{0:MM}" -f $parseDate
		$month = "{0:MMMM}" -f $parseDate		
		
		$fileName = "{0:yyyyMMdd}" -f $parseDate
		$fileExtension = $file.Extension
	
		
		$directory = $targetFolder + "\" + $year + "\" + "$monthNr"
		if (!(Test-Path $Directory))
		{
			New-Item $directory -type directory | Out-Null
		}
		
		$newFileName = "$fileName$fileExtension"
		$targetFile = "$directory\$newFileName"
		
		Move-Item $file.FullName -Destination $targetFile
	}
	catch{
		Write-Host "Could not copy file $file"
	}
}

The next script is designed to zip all folders in a directory individually.


#This script zips up any folders found in a particular directory and then removes the original
Add-Type -AssemblyName System.IO.Compression.FileSystem
 
$directory = "C:\folder to zip\"
 
$folders = Get-ChildItem -Path $directory | Where-Object {$_.PSIsContainer} | Select-Object -ExpandProperty FullName
 
foreach ($folder in $folders) {
    $archive = $folder + '.zip'
    [System.IO.Compression.ZipFile]::CreateFromDirectory($folder, $archive, 'Optimal', $True)
}
Remove-Item $folders -Recurse -Confirm:$false

Like I said at some point I may combine these two, but for now they are the way they are.

SQL Server Tools

SQL Server Tools

At work our Point Of Sale system runs on SQL Server 2012 express. So I don’t have all the goodies of the full version of SQL Server 2012, but it’s not like our server handles dozens of stores or anything like that. But I like to keep our system backups up and maintained as best as possible. So I figured I’d post some of the stuff I use for the server here.

Server Backup

For our server I use a program called SQL Backup Master. It can be found at https://www.sqlbackupmaster.com/It’s a great program as far as I’m concerned. It’s not my only backup. I am one for redundancy. However what I like about this program is it’s dead simple. Just install it, set up a backup schedule and it’s off and running. It also emails you letting you know that it’s done with a backup, or if one has failed. Best part is it’s free, at least for the amount of use I use it for. There are paid versions if you need more than one scheduled backup. But for me I just need the one.

 

Maintenance

Again our SQL Server is small but from time to time it does need some maintenance. Really it’s mainly in the form of reindexing and rebuilding the indexes, or defragging. I’m sure there’s more I can do to it, but honestly I’m kind new to SQL, sure I can read info, I understand bits of it, but I consider myself still in the training wheels mode. So I found these two scripts that I’m using. I got them from This article: How to automate SQL Server defragmentation using policies. I’ll post this code I use here in case that page ever disappears from the web. But I highly suggest you look at the article. Especially if you’re able to automate these with the full version of SQL Server.

Check Fragmentation of DB

--Script 1: Detecting index fragmentation

SELECT dbschemas.[name] AS 'Schema',
dbtables.[name] AS 'Table',
dbindexes.[name] AS 'Index',
indexstats.avg_fragmentation_in_percent AS 'Frag (%)',
indexstats.page_count AS 'Page count'

FROM sys.dm_db_index_physical_stats (DB_ID(), NULL, NULL, NULL, NULL) AS indexstats
INNER JOIN sys.tables dbtables ON dbtables.[object_id] = indexstats.[object_id]
INNER JOIN sys.schemas dbschemas ON dbtables.[schema_id] = dbschemas.[schema_id]
INNER JOIN sys.indexes AS dbindexes ON dbindexes.[object_id] = indexstats.[object_id]
AND indexstats.index_id = dbindexes.index_id
WHERE indexstats.database_id = DB_ID()

ORDER BY indexstats.avg_fragmentation_in_percent DESC

Defragment Indexes to the recommended levels




-- Script 4: Automatically analyze and defragment indexes

-- Set variables
-- *********************************************************************************************
SET NOCOUNT ON

DECLARE @reorg_frag_thresh   float	SET @reorg_frag_thresh	= 10.0
DECLARE @rebuild_frag_thresh float	SET @rebuild_frag_thresh = 30.0
DECLARE @fill_factor         tinyint	SET @fill_factor = 0
DECLARE @report_only         bit	SET @report_only = 0
DECLARE @page_count_thresh   smallint	SET @page_count_thresh = 1
-- *********************************************************************************************
DECLARE @objectid       int
DECLARE @indexid        int
DECLARE @partitioncount bigint
DECLARE @schemaname     nvarchar(130) 
DECLARE @objectname     nvarchar(130) 
DECLARE @indexname      nvarchar(130) 
DECLARE @partitionnum   bigint
DECLARE @partitions     bigint
DECLARE @frag           float
DECLARE @page_count     int
DECLARE @command        nvarchar(4000)
DECLARE @intentions     nvarchar(4000)
DECLARE @table_var      TABLE(
                          objectid     int,
                          indexid      int,
                          partitionnum int,
                          frag         float,
		    page_count   int
                        )
INSERT INTO
    @table_var
SELECT
    [object_id]                    AS objectid,
    [index_id]                     AS indexid,
    [partition_number]             AS partitionnum,
    [avg_fragmentation_in_percent] AS frag,
    [page_count]		  AS page_count
FROM
    sys.dm_db_index_physical_stats (DB_ID(), NULL, NULL , NULL, 'LIMITED')
WHERE
    [avg_fragmentation_in_percent] > @reorg_frag_thresh 
	AND
	page_count > @page_count_thresh
	AND
    index_id > 0	
 DECLARE partitions CURSOR FOR
    SELECT * FROM @table_var 
OPEN partitions 
WHILE (1=1) BEGIN
    FETCH NEXT
        FROM partitions
        INTO @objectid, @indexid, @partitionnum, @frag, @page_count 
    IF @@FETCH_STATUS < 0 BREAK
    SELECT
        @objectname = QUOTENAME(o.[name]),
        @schemaname = QUOTENAME(s.[name])
    FROM
        sys.objects AS o WITH (NOLOCK)
        JOIN sys.schemas AS s WITH (NOLOCK)
        ON s.[schema_id] = o.[schema_id]
    WHERE
        o.[object_id] = @objectid 
    SELECT
        @indexname = QUOTENAME([name])
    FROM
        sys.indexes WITH (NOLOCK)
    WHERE
        [object_id] = @objectid AND
        [index_id] = @indexid 
    SELECT
        @partitioncount = count (*)
    FROM
        sys.partitions WITH (NOLOCK)
    WHERE
        [object_id] = @objectid AND
        [index_id] = @indexid		
    SET @intentions =
        @schemaname + N'.' +
        @objectname + N'.' +
        @indexname + N':' + CHAR(13) + CHAR(10)
    SET @intentions =
        REPLACE(SPACE(LEN(@intentions)), ' ', '=') + CHAR(13) + CHAR(10) +
        @intentions
    SET @intentions = @intentions +
        N' FRAGMENTATION: ' + CAST(@frag AS nvarchar) + N'%' + CHAR(13) + CHAR(10) +
        N' PAGE COUNT: '    + CAST(@page_count AS nvarchar) + CHAR(13) + CHAR(10) 
    IF @frag < @rebuild_frag_thresh BEGIN
        SET @intentions = @intentions +
            N' OPERATION: REORGANIZE' + CHAR(13) + CHAR(10)
        SET @command =
            N'ALTER INDEX ' + @indexname +
            N' ON ' + @schemaname + N'.' + @objectname +
            N' REORGANIZE; ' + 
            N' UPDATE STATISTICS ' + @schemaname + N'.' + @objectname + 
            N' ' + @indexname + ';'
    END
    IF @frag >= @rebuild_frag_thresh BEGIN
        SET @intentions = @intentions +
            N' OPERATION: REBUILD' + CHAR(13) + CHAR(10)
        SET @command =
            N'ALTER INDEX ' + @indexname +
            N' ON ' + @schemaname + N'.' +     @objectname +
            N' REBUILD'
    END
    IF @partitioncount > 1 BEGIN
        SET @intentions = @intentions +
            N' PARTITION: ' + CAST(@partitionnum AS nvarchar(10)) + CHAR(13) + CHAR(10)
        SET @command = @command +
            N' PARTITION=' + CAST(@partitionnum AS nvarchar(10))
    END
    IF @frag >= @rebuild_frag_thresh AND @fill_factor > 0 AND @fill_factor < 100 BEGIN
        SET @intentions = @intentions +
            N' FILL FACTOR: ' + CAST(@fill_factor AS nvarchar) + CHAR(13) + CHAR(10)
        SET @command = @command +
            N' WITH (FILLFACTOR = ' + CAST(@fill_factor AS nvarchar) + ')'
    END
    IF @report_only = 0 BEGIN
        SET @intentions = @intentions + N' EXECUTING: ' + @command
        PRINT @intentions	    
        EXEC (@command)
    END ELSE BEGIN
        PRINT @intentions
    END
        PRINT @command
END
CLOSE partitions
DEALLOCATE partitions
GO


 

Hyper-V Server Backup Script

Hyper-V Server Backup Script

So I have a Hyper-V Server that I have a bunch of VMs on and while I don’t need the backups of a commercial business I do need to do a backup of my VMs from time to time.

Now I can’t take all the credit for this script. over at GitHub wrote the original script. The problem with his script is it’s designed for a server that has full functionality, which a straight hyper-v server doesn’t. At least as far as I’ve learned. Correct me if I’m wrong.

So what I needed to do was create a script that could be scheduled and ran from my main server that would put the files in a backup location and only save the last couple of backups. So I did some modifications and tested most of the script. Works great for my system.

So here’s the code.

# This script it designed to retrieve all virtual machines from a remote hyper-v server and export them to a location of your choosing.
# You can set this up as a scheduled task based on your needs. So if you need backups daily, weekly, you can set that based on your needs.
# It will then remove any backups older than the amount of backups you configure.

# Enter the name of the server you want to backup
$server = "HYPERV-SERVER"
# Enter the full path for the backup folder
$backuppath = "\\duncanserver\Hyper-V Backups" # Example: "\\backupserver\fileshare\HyperVBackups"
# How many days backups of VMs you want to keep
$backupstokeep = 7

# Get all Hyper-V VMs
$vms = Get-VM -computername $hypervserver
# Grab the current date
$today = Get-Date -Format MM-dd-yy

foreach ($vm in $vms) {
    $vmname = $vm.Name
    Write-Host "Backing up $vmname..."
    # Create the folders for the backup
    New-Item -ItemType Directory -Path "$backuppath\$vmname" # We run this in case it is a new VM.  Normally it will fail if the VM folder already exists, which is fine
    New-Item -ItemType Directory -Path "$backuppath\$vmname\$today"
    # Export the VM
    Export-VM -VM $vm -Path "$backuppath\$vmname\$today"
    # Remove any backups older than the past 7 days
    Get-ChildItem "$backuppath\$vmname" | Sort-Object -Property CreationTime -Descending | Select-Object -Skip $backupstokeep | Remove-Item -Recurse
}

Hope this helps you out.

Couple of Free Website Templates

Couple of Free Website Templates

So today I’ve decided to post a couple of  website templates I created. Both are done in Bootstrap, and are pretty much ready to be altered to whatever way someone wants them to be.

They’re nothing special honestly, in fact at some point I might improve them a bit, but for now if you have a use for them feel free to take them and use them. Just try to keep the link at the bottom for me. Thanks.

Wedding Website Template

Wedding Website Download

Liquor Store Template


Liquor Store Website Download