My New Laptop

| November 17th, 2018

Got a new laptop today and just had to blog about it!

I’ve owned my fair share of laptops over the years. Dell, Acer, Asus, IBM, Lenovo, Compaq – not necessarily in that order. The one common theme across all the models I’ve owned though? BUDGET!

I have always ended up buying, or acquiring an older or less powerfull laptop due to cost. Its not that I couldn’t afford it, but more couldn’t justify it.

As I age, and grow infinitely more sagely (ha ha) I’m starting to realize that there is a very clear relationship between value and cost, and that you really need to do your homework to understand the value for the money you’re spending.

Take this instance, for example. I knew I wanted to buy a laptop, and that I wanted to play games on it as well as do all the other things that I do on a regular basis such as surf websites, watch YouTube, edit pictures and videos, connect remotely to my Linux and FreeBSD machines – you get the picture. Now, normally my mind says “I NEED LAPTOP NOW GIMMIE LAPTOP ANY LAPTOP FIND IT GET IT BUY IT…. sigh.. its not quite what I wanted.” I get so excited, and buy the first thing I can find that I can afford, where the specs LOOK good – but in the end I realize that I was wrong, or at least mistaken.

This time, I approached things a bit differently. I decided that I wasn’t going to try to find the $500 laptop that would be slightly better than whatever I had. I had specific requirements, and I wasn’t going to settle for less (unless the option was up-gradable later on, such as RAM or hard drive). Now, it was hard. I was nearly gnawing my own arm off with the same old feeling of “I WANT LAPTOP NAOWWW!!” but I search around, became familiar with the prices, and hardware – and because of this, chose what I believe the be the best laptop for my needs that has all the specs I wanted.

Here are my most important criteria:

1. Intel Core i7 Processor: I specifically wanted an i7 because I’ve “settled” for other processors in the past only to be disapointed with the performance. This time, I not only got what one, I got an 8th gen, 6 core processor.

2. Minimum 16GB dual channel (2×8) ram: Now this one is purely for gaming performance. To be fair, I thought I had purchased a laptop that had a single 16GB dimm, but to my surprise (when I opened it up, because that’s what you do when you get a new laptop) it had 2×8.

3. Two hard drive config (SSD + HDD): Again here, it was about performance. I wanted the SSD to make Windows boot times not feel like forever, as well as to put longer-loading games so they’d perform better. The laptop I chose had a 128GB NVME PCIe m.2 SSD + 1TB 5400rpm HDD combo. When I got home, I immediately cloned and replaced the 128GB with a 256GB of the same type of drive – and was again pleasantly surprised to find out that the HDD was 7200 rpm!

4. nVidia GTX Graphics: This one was difficult, because there are so many types of nVidia cards, and some are very simliar. I decided that I wanted an nVidia Geforce GTX 1050 Ti. This laptop had just that.

5. No gawdy design: I did NOT want a pulsating green or red or blue, or all three colour laptop. I’m almost 40 years old, and while most people will ask what that has to do with anything, to me it means I look too old to be putting on a light-show for everyone at the local Starbucks. That being said, this laptop is elegant enough to turn some heads, but subtle enough that it doesn’t kick you in the face.

Anything else was gravy, and gravy it was. The screen is a great size, and has small bezels. The keyboard (which I’m using right now to type this) is fantastic, and the ports are on the back! ON THE BACK! Someone finally watched someone play games with all the cords, and said – oh wow, it’d be nice if those were out of the way.

Connection wise, this laptop has 3x USB 3.0, 1x USB C, 1x MiniDP, 1x HDMI and an in/out combo 3.5 mm headphone jack. Plenty of room for what I need.

On top of all of this, as if that wasn’t enough – this laptop is sold at Costco in Canada, meaning that immediately I get 2 years of manufacturer warranty!

Ok – so I’ve kept you in suspense long enough. The laptop I bought today is a Lenovo Legion Y530, Core i7-8750H. A fantastic system that’s elegant, relatively light for a gaming laptop, and nice and slim.

I hope you’ve enjoyed my random blog post about my new laptop, and hopefully I’ll update with any findings about it, as I get accustomed to my new friend.

Check it out at Costco.ca by clicking here!

Disclaimer:  I was not compensated in any way for writing this post.  These are my own thoughts and opinions on both the Lenovo Y530, and my purchase at Costco in Canada.  I received no discount on this, or any other products.

2018…

| February 28th, 2018

My favourite part about maintaining a blog (and I use the term maintaining loosely…)?

You can go an entire year, and not update it once…

Happy 2018 (at the end of February)…

Check out my PowerShell blog which I seem to actually update once in a while 😀

http://www.billingham.ca/powershell

Ping a List of Computers

| February 28th, 2018

Have you ever had a list of IP addresses that you need to ping, and check for DNS entry? Have you ever had to do it manually, one at a time? I did, wayyyyyy before I learned how to automate the mundane.

Now, the following script is not as pretty as it could be, but it serves me fine because I just need it to get the data, and I do the rest of the formatting in Excel.

#Create your output file with headers.
#(it will do this each time you run the script, to reset the file.)
$OUTPUT = “IP| STATUS| HOSTNAME” | Out-File .\pingList-Report.csv

#Import your list of IP addresses. They should be in a file called ipaddresses.csv, single column with a header of “ipaddress”.
$TOPING = (import-csv .\ipaddresses.csv).ipaddress

#Loop through the IP Addresses from the ipaddresses.csv file
foreach ($ip in $TOPING){

#First, resolve the hostname by performing a DNS lookup.
$HOSTNAME = (resolve-dnsname $ip -ErrorAction SilentlyContinue).namehost
#Ping the IP using the “test-connection” cmdlet, and if it responds (if the condition is true) set the status variable to “ONLINE”
if (Test-Connection $ip -Count 1 -Quiet) {
$PINGSTAT = “ONLINE”
}
else {
#If it doesn’t respond (if the condition is anything but true) set the status variable to “OFFLINE”
$PINGSTAT = “OFFLINE”
}
#Output the results from this IP to the file, and move on to the next IP.
$OUTPUT = “$ip| $PINGSTAT| $HOSTNAME” | Out-File .\pingList-Report.csv -Append
}

That’s the whole script. The input file (ipaddresses.csv) should be formatted as such:

ipaddress
10.20.30.40
50.60.70.80

The Output file will look similar to this:

IP| STATUS| HOSTNAME
10.20.30.40| ONLINE| server1.domain.com
50.60.70.80| ONLINE| server2.domain.com

Once you have this CSV, you can import ==> From Text File in Excel, and set the delimter as the pipe “|” character.

**BONUS TIP **
You may be wondering why I use the pipe instead of actually using a CSV. Well, I pull a lot of data from Active Directory and Exchange using powershell, and unfortunately its still not easy to separate fields such as “DisplayName”, which is typically “Lastname, Firstname”. The comma between the two names tends to be read as two separate fields when you import into Excel. By using Out-File and delimiting using pipe or “|” it allows me to use a character that is rarely used in any field in either AD or Exchange, and ensures that there is no confusion in fields that contain a comma as part of the data.

Thanks for reading, and feel free to post comments below. I’d love to hear if this script worked for you, and/or any enhancements you may have made to it!

Jay

Restore AD Account

| February 25th, 2018

Every Active Directory Admin has done it.  Delete a user (or users), and for one reason or another you need them back.  Well, there’s a solution in the Active Directory Reycle Bin.

This feature should have been thought of a long time ago, but it’s been around long enough now that I can’t really complain too much.  Its very simple to use (once it’s enabled), and saves a ton of time that you would otherwise be using to re-create, or restore the accounts from a backup of some kind.

Now, I’m not going to get into how to enable this feature.  I reserve this blog for quick posts, with simple commands or scripts that you can start using right away.  If you do a search for how to enable it, I guarantee you’ll find a number of websites with screenshots to guide you through it.

Find Your Deleted User

In order to restore the user, you first have to find them.  To do this, you have to use the Get-AdObject command, which if you’ve used it before, you know how frustrating it can be sometimes.

Get-AdUser -Filter ‘ObjectClass -eq “User” -AND IsDeleted -eq $True -IncludeDeletedObjects -Properties IsDeleted, LastKnownParent | fl

The command above will find deleted user objects, and show you not only the name, but the LastKnownParent (last known OU).  Once you have the list, you can add more items to the filter list to narrow down your search, and then pipe the results to the restore command.

Restore Your Deleted User

Now that you’ve found your user, restoring is simple.  You can simply pipe the results to the Restore-AdObject command.

Get-AdUser -Filter ‘ObjectClass -eq “User” -AND IsDeleted -eq $True -IncludeDeletedObjects -Properties IsDeleted, LastKnownParent | Restore-AdObject

This is the simplest way to perform the restore, and will put the object back into it’s last known OU in your AD tree.  There are many other ways to narrow down the users, or specify an alternate OU, but I wanted to cover the simplest possible scenario for people looking for a quick fix to their problem.   If there is demand for more info, I’ll write a follow up post, so let me know in the comments below.

Hello world!

| November 15th, 2016

PS C:\>notepad.exe .\helloWorld.ps1


#Hello World - First Post to billingham.ca/powershell
$OUTPUT = "text" | Out-File .\greeting.csv
$OUTPUT = "Hello, World!" | Out-File .\greeting.csv -Append

$greeting = (import-csv .\greeting.csv).text

foreach ($item in $greeting) {

     if ($item -ne $null) {
          write-host $item
     }
}

PS C:\>.\helloWorld.ps1

Hello, World!

PS C:\> _

PowerShell is Open Source!

| November 3rd, 2016

I’m a bit late posting this (for all the people who don’t read my blog?), but PowerShell is now open source!  What does this mean?  Well for starters it means more community updates, and forks to this already extremely powerful scripting language for Windows.  The other thing that makes this great is that, since Microsoft’s reason for going open source was because they had to rebuild PowerShell to run on Nano Server, which only runs Microsoft DotNet Core, it meant that now all other systems that run DotNet Core (such as Linux and MacOS), can also run PowerShell!  Or, I suppose I should say, will eventually be able to properly run PowerShell.

This is exciting news, because as a PowerShell guy, I now have become a bit more relevant in the Linux and MacOS worlds.  I use a Mac and have admin’d Linux before, but my “bash” scripting is a bit less mature than my PowerShell.

I have to mention though, that I’ve tried PowerShell on both Linux and Mac, and there are some pieces of functionality that aren’t available yet that I use day-to-day, such as the ability to use remote PSSessions.  These are coming, and I even saw a working demo of this at Ignite on an Ubuntu box (running in Azure of course).

I’m extremely pleased to see Microsoft continuing to embrace open source, and bringing something as proprietary as PowerShell to the cross-platform stage.

I ran into this issue today trying to copy a file from one of my Raspberry Pi devices (running Raspbian) to another.  Turns out that its related to the space in the path.  Now, I know that you can’t have spaces in Linux file names and/or paths, so I escaped it with a backslash like a good boy; however this did not help.  It turns out, it also needs to be in quotes.  Who knew?

Apparently this guy did: Mike’s Tech Blog

I couldn’t find anywhere to easily get in touch with him to thank him, so I’ll say it here.  Thanks Mike!

A PowerShell Truth…

| June 3rd, 2016
So true its painful...

So true its painful…

Cloud Storage

| November 6th, 2015

Microsoft just announced that they’re pulling back in the reins for their OneDrive offerings: Read about it here.

I don’t disagree that the people using upwards of 75TB to store their Blu-ray collection, or whatever it was, were abusing the limitless storage. What I disagree with is a company using very limited instances of abuse as an excuse to remodel it’s entire offering. I agree with limiting the bottomless Office 365 plan, that probably wasn’t the best idea anyway, but to rein in current, legitimate users when you’ve already given that space, forcing them to have to pare down the data they are storing there to meet your requirements (albeit with 12 months grace to do so) is something else.

Also, Microsoft is said to be changing the free offering as well, from 15GB down to just 5GB. Can someone explain to me how someone, in a paid service, using an impressive amount of disk space, needs to have an impact on the free service? If you want to change your service offering, do it without the excuse. It’s your right to change it whenever and however you feel, but don’t try to make it about a tiny minority of your paid user base.

Anyway, I’m personally getting out of dodge until I see how this plays out. I’m going to look into moving my files into an OwnCloud solution. That way, I’m only limited to the amount of disk I have available, and I can have better control of my files and data overall.

OwnCloud: https://owncloud.org

SDF.org

| October 21st, 2015

Ever wished you could have a shell account to play with?  Maybe you don’t want to install Linux on your own, or you don’t have a school or work system you get to “practice” your Linux skills on.  For those who want to learn, there is SDF.org.