PLAY PODCASTS
SAS 025 – In the Lab – Intro to PowerShell

SAS 025 – In the Lab – Intro to PowerShell

SysAdmin Show

July 30, 201944m 43s

Audio is streamed directly from the publisher (dts.podtrac.com) as published in their RSS feed. Play Podcasts does not host this file. Rights-holders can request removal through the copyright & takedown page.

Show Notes

In this lab episode I run through a recent PowerShell project.  This is a very basic example will give you an idea what can be done with PowerShell.  The YouTube video for this episode can be found at https://youtu.be/SXv-ZVV9ioc.

 

As promised I have included the final scripts below.

##########################demo.ps1#####################

#Define variables
$webdata = “”
$complete = “”

#scrape website content to variable
$webdata = Invoke-WebRequest “www.sysadminshow.com”

while ($complete -ne “1”)
{
if($webdata -like “*SysAdmin Show*”) # check for specific string
{
write-host “Found it!”
$complete = “1”
Start-Process calc.exe
}
else
{
write-host “Not Ready”
}

Start-Sleep -Seconds 1
}

####################launch.bat#####################

powershell -WindowStyle Hidden “c:\scripts\demo.ps1”