PowerShell: GoodSync Installer/Updater, Service Disabler and Cleanup

I use GoodSync for file synchronization a lot. While a awesome program, there are two major issues I find with it – the lack of a auto-update mechanism and the GoodSync Server service which is auto-enabled each time you update and I personally don’t use. So I created a PowerShell script to take care of all that. Downloading the msi, initiating the install/update, stopping and disabling the GoodSync Server services and cleaning up the temporary files and desktop icons. Enjoy!

GitHub

# GoodSync All
# This script is designed to install or update Goodsync, stop and disable services (GoodSync Server) and clean up desktop icons.
# Designed for GoodSync 10.x

# Checks for Administrator privileges and opens an elevated prompt is user has Administrator rights
If (-NOT ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator"))
{   
    $arguments = "& '" + $myinvocation.mycommand.definition + "'"
    Start-Process powershell -Verb runAs -ArgumentList $arguments
    Break
}

# SSL Certificate Handling
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

# All the variables
$sstat = Get-Service -Name GsServer
$sstart = Get-WmiObject -Query "Select StartMode From Win32_Service Where Name='GsServer'"
$dl = "https://www.goodsync.com/download/GoodSync-v10-Setup.msi"
$msi = "GoodSync-v10-Setup.msi"

# Downloads GoodSync .msi to system TEMP folder, installs and removes .msi
Invoke-WebRequest -uri $dl -OutFile $env:TEMP\$msi
Start-Process msiexec.exe -Wait -ArgumentList "/I $env:TEMP\$msi /quiet"
Remove-Item $env:TEMP\$msi

# Checks for Service Status
# Stops GoodSync Service if it's running, otherwise continues
if ($sstat.status -eq "running"){
    write-output "Stopping GoodSync Server"
    stop-service gsserver
    "Service is stopped"
    "Continuing....."
    ""
    }
elseif ($sstat.status -eq "stopped"){
    write-output "GoodSync Server is already Stopped"
    "Continuing....."
    ""
    }
if ($sstart.startmode -ne "disabled"){
    write-output "Setting GoodSync Server service to Disabled"
    set-service gsserver -startuptype disabled
    "Done"
    }
elseif ($sstart.startmode -eq "disabled"){
    write-output "GoodSync Server service is already Disabled"
    "Done"
    }

# Removes GoodSync desktop shortcuts
Remove-Item $env:public\Desktop\GoodSync*.lnk

 

PowerShell : Windows 10 Modern Application Removal Script

If you have Windows 10 you’ve not doubt seen the new modern apps and either love them, hate them or just don’t want to deal with them. Windows 10 does not provide an easy way to remove any of these applications or to keep them from running which can be a major issue for low RAM systems. The good news is they can quickly be removed via a few PowerShell commands or a script. The script below is one I’ve been using to manage them on my systems. You can also find a link to GitHub where I maintain this and several other PowerShell scripts I routinely use.

GitHub PowerShell Scripts | GitHub W10RemoveCoreApps Script
Read more of this post

Patching the vCenter 6.x Appliance

With the latest version of the vCenter Appliance (vCSA) there is a new process to patching the appliance. Gone is the old Web UI of the 5.x era. The new process isn’t anything to be scared about though and should be familiar to most Admins and techs. Instead of the old web interface the upgrade process is basically just to attach the patch ISO and run a few commands via the console or SSH.

While researching the proces to update my own server however I came across a few unclear instructions concerning the process. I worked out what I needed to do after a few searches and a couple KB’s. Most of this guide will be a rehash of others and the official instructions but I will be including a few clarifications as well as some visual representations of the process to help those that got a little confused by the regular instructions.

Read more of this post

Don’t let your hard work put money in someone else’s pocket.

Don’t let your hard work put money in someone else’s pocket.

Quick Fix: Fixing a loose Micro USB Cable

Almost everyone has a smartphone or another device that connects with a Micro USB cable. And almost everyone has had a cable become loose over time and not fit securely. It can be infuriating to have the cable drop out a the slightest movement or to head endless pings from your computer telling you the cable disconnected. Rather than throw out a cable and get a new one, here’s a simple 5-min fix that can restore your cable back to new (or at least make it stay put).

Read more of this post

Changing Services with the Command Line

Changing services, whether changing the startup type or stopping/starting them, is something every user will have to do. While it’s easy to simply go through the Services MMC that can be time consuming, especially when a PC is being slow. The prefered method would be through the Command Line, either manually or through a pre-written batch file. So how do you do this? Check below for details.
Read more of this post

Fixing corrupted Tasks in Windows

Ever had a corrupted task in Windows scheduler? It can happen after a restore, removable of software or accounts, a fail install or any number of other reasons. It can be infuriating to try to fix it, particularly if it’s corrupted enough to Task Scheduler can’t even show the task. It can also cause a variety of issue on your system and prevent you from adding new tasks, especially if they call the same program/script. How do you fix this? Looking in the Task Scheduler interface doesn’t provide much help due to it’s very minimal and simple management options. Even on Windows Server there aren’t very many options to work with. Turns out the solution is easy and requires nothing more than than deleting a file. Granted, you do need to know what file you’re looking for (which should be easy if you named the task logically).

The files can be found in your Windows folder under

C:\Windows\System 32\Tasks

This should be the same under all versions of Windows. Just find the problem task and delete or rename it. That’s all you need to do! A quick refresh of Task Scheduler should load the remaining tasks, sans those you removed. If any programs were affected by the corrupted task you should be able to restart them and continue any necessary troubleshooting.

Installing Box.net Sync on Windows Server

Anyone who’s tried to install the Box.net Sync client on Windows Server knows how much trouble it will give you. Since Box.net does not officially support server operating systems (which strikes me as odd considering how much they market to businesses) you can’t install it on Windows Server with the regular package. Any attempt will result in a compatibility error. So how do you get around this? Don’t use the regular install package. Box.net offers MSI versions of the sync client which will install without a single complaint on Windows Server (Server 2008 32-bit for mine).

You should be able to find the links on the right side of the Sync page. Just download the version for your server, install and you’re good to go!

Screenshot 2013-07-12 05.38.53

How to get official ISO and Images from Microsoft for Free

For most of us if we need a Office or Windows ISO or image we either A) have to have the disc or B) hit up a torrent/download site for one. What if I told you that Microsoft offered official downloads of Windows, Office and other Microsoft products for free. They are offered through Microsoft’s Digital River Content service. It’s a great alternative to pirate sites or having to order a disc (which required a existing key and costs money) which can be a lot of trouble. I first discovered this source as I was building a library of ISO’s for my on-site technician job. I had some of the CD’s from past purchases but not all I would need.

So without further ado hit the links after the break for all the downloads. All the downloads are resumable and are quite fast. I will be updating this as I get time going forward.
Read more of this post

Custom Icons/Labels for your drives with autorun.inf

By default, Windows automatically adds icons to local drives as defined in the system and names as they were set during formatting. Most users could care less what the icons are or what the drive name is. But what if you want want to be able to tell your drives apart at a glance? Maybe you want a more descriptive name then “Local Disk (C:)”. Luckily windows (and perhaps other OS’s; I haven’t tested it) has a easy way to do so. How you ask? Our old friend autorun.inf. Click through to find out how to do it.
diskicons
Read more of this post

Verified by MonsterInsights