How to package your scripts with WinRAR

If you’re dealing with muliple files in your scripts, it is best to package them all into one EXE. In this tutorial, I will show you how to package your scripts using WinRAR.
Read more

Convert Youtube Videos to MP3

Happy New Years!

The following script will use YoutubeinMP3.com’s API to download the audio from most YouTube Videos. All you have to edit is the $dest variable and insert the directory that you want your mp3’s to go.

Note: This does not work with all videos! I have contacted YoutubeinMP3.com to figure out why certain videos do not work.

try {
    $ytstring = Read-host "Please insert the Youtube Video ID"
    $json = Invoke-WebRequest "http://www.youtubeinmp3.com/fetch/?format=JSON&video=http://www.youtube.com/watch?v=$ytstring"
    $dlurl = $json | ConvertFrom-Json | Select -Property link | Format-Table -HideTableHeaders | out-file url.txt
    $songtitle = $json | ConvertFrom-Json | Select -Property title | Format-Table -HideTableHeaders | out-file title.txt
    $filename = get-content title.txt
    $dest = "C:\Users\jespitia\Documents\Downloads\'$filename'.mp3"
    $url = get-content url.txt
    $uri = "$url"
    Invoke-Webrequest -Uri $uri -OutFile "$dest"
}
catch {
    write-host Please try another Video -ForegroundColor Red
}

Enjoy!

Search for Uninstall Strings

This Powershell Script will search through your registry and locate uninstall strings for your 32bit and 64bit programs. It is very easy to use and all you have to do is type in the name of the program to locate the uninstall string.
Read more

Automatic TeamViewer Download for Customers

Have you ever spent 20 minutes trying to explain how to download Teamviewer to a customer or family member? Well thankfully, we have a solution for this!
Read more

Automatically Upload Files to your FTP Server

Happy holidays!

I apologize that I haven’t posted anything new in a few days. I have been busy learning Powershell! In the mean time, here is another helpful FTP script.
Read more

Get Movie Information from Powershell

I recently have been messing around with Powershell and during my scripting tests, I came across a cmdlet called Invoke-WebRequest. It is an extremely powerful cmdlet that can grab data from a web page or web service. As I started to read about it, I decided that it would be neat to grab XML data from a website and display it in Powershell. During my search for an api, I came across http://www.omdbapi.com/, which is a free service that contains movie information.
Read more

How to backup your Bitlocker Keys

This script will backup a computer’s Bitlocker key and export it as a text file.

Script:

@ECHO OFF
REM Set your backup directory
SET DIRECTORY="YOUR DIRECTORY"

REM Sets the Date
SET CURRENTDATE="%date:~4,2%%date:~7,2%%date:~10,4%"


ECHO Backing up Bitlocker Keys
ping -n 3 127.0.0.1>nul

REM Copying Bitlocker keys to a textfile
manage-bde -protectors c: -get >"%DIRECTORY%\%CURRENTDATE%_%COMPUTERNAME%.txt

CLS
ECHO DONE
ping -n 3 127.0.0.1>nul

How to get a user’s SID

The following script will echo the current user’s SID:

FOR /F "tokens=2" %%a in ('whoami /user /fo table /nh') do SET SID=%%a
echo %sid%

The following script will echo any user’s SID that you typed in:

SET /P USERNAME_PROFILE="Enter the username here: "

reg query "HKLM\software\microsoft\windows nt\currentversion\profilelist" /s >>reg_sid.txt
findstr /n /i %USERNAME_PROFILE% reg_sid.txt>>sid_number.txt 
for /f "tokens=1 delims=:" %%i in (sid_number.txt) do set line_num=%%i
set /a line_num=%line_num% - 2 
for /f "skip=%line_num% tokens=7 delims=\" %%i in (reg_sid.txt) do set sid=%%i & goto :continue 
:continue 
for /f "tokens=* delims= " %%A in ('echo %SID%') do set SID=%%A
set SID=%SID:~0,-1%
del reg_sid.txt 
del sid_number.txt
ECHO %USERNAME_PROFILE%'s SID is: %SID%

Automating FTP Downloads

This batch script will compare your local and remote directories, and download what you do not have locally. This can be perfect for someone that has a seedbox and wants to automate their downloads to their local computer. Read more

How to silently install and uninstall Adobe Air applications

In this example I will show you how to silently install Salesforce Chatter 3.2.1. You will first need to download AIR Redistribution Helper (ARH) here.  The AIR Redistribution Helper (ARH) utility is a small executable that you can use as part of a custom installer.
Read more