Me, You… Powerscripting Podcast. Be there!
Tonight, March 19th 9pm EST
Powerscripting Podcast
UStream: Click Here to listen/watch live
tshell :: Mar.19.2009 :: All :: 1 Comment »
Tonight, March 19th 9pm EST
Powerscripting Podcast
UStream: Click Here to listen/watch live
tshell :: Mar.19.2009 :: All :: 1 Comment »
For those who don’t know a while back MS started allowing direct access to the SysInternal tools via a WebDav share located here \\live.sysinternals.com\tools. While this did make access to SysInternal tools much eaiser, it still has issues with proxies so I wrote this script (it will be added to my BSonPosh module.)
NOTE: This is for V2 Only
.Synopsis
List or updates sysinternal files from the internet.Description
List or updates sysinternal files from the internet.Parameter Path
Where you want the files to download to..Parameter FileName
The FileName you want to download.Parameter All
Updates all the Files.Parameter Passthru
Returns a FileInfo Object for the downloaded file.Example
# To see a list of available files from Sysinternals
Get-SysInternals# To download a single file
Get-SysInternals -FileName pslist.exe# To download all the files available
Get-SysInternals -All# To download only files you already have
Get-ChildItem C:\tools | Get-SysInternals
Download it: Get-SysInternals.ps1
.Description
List or updates sysinternal files from the internet
.Parameter Path
Where you want the files to download to.
.Parameter FileName
The FileName you want to download
.Parameter All
Updates all the Files
.Parameter Passthru
Returns a FileInfo Object for the downloaded file
.Example
# To see a list of available files from Sysinternals
Get-SysInternals
# To download a single file
Get-SysInternals -FileName pslist.exe
# To download all the files available
Get-SysInternals -All
# To download only files you already have
Get-ChildItem C:\tools | Get-SysInternals
.ReturnValue
Object
.Link
N/A
.Notes
NAME: Get-SysInternals
AUTHOR: YetiCentral\bshell
Website: www.bsonposh.com
LASTEDIT: 03/16/2009 18:25:15
#Requires -Version 2.0
#>
[cmdletbinding()]
Param(
[parameter()]
$Path,
[parameter(ValueFromPipeLine=$true)]
$FileName,
[parameter()]
[switch]$All,
[parameter()]
[switch]$Passthru
)
Begin
{
if(!$Path)
{
$ToolsPath = split-path (Get-command pslist.exe).Path -parent
if(!$ToolsPath)
{
$path = Read-Host "Enter Path: "
}
else
{
$path = $ToolsPath
}
}
Write-Verbose " Path: $Path"
Write-Verbose " FileName: $FileName"
write-verbose " ALL: $ALL"
$Cont = $true
}
Process
{
if($FileName)
{
Try
{
Write-Verbose " Downloading File [$FileName]"
$webclient.DownloadFile("http://live.sysinternals.com/$FileName","$path\$FileName")
Write-Verbose " ==> Downloaded [$FileName]"
if($passthru){Get-Item "$path\$FileName"}
}
catch
{
Write-Verbose " Failed to Download File [$FileName]"
}
$cont = $false
}
}
End
{
if($Cont)
{
# Get file content
$webclient = New-Object System.Net.WebClient
$HTML = $webclient.DownloadString("http://live.sysinternals.com/")
$links = $HTML -split ""
$Files = @()
# Building RegEx
$regex = "^.*y,\s(?.*)(AM|PM)"
$regex += "\s*(?\d*)\s+\"
$regex += "<a href="\`">(?.*)\"
# Creating an Object from the Links
switch -regex ($links)
{
$regex
{
$myobj = "" | Select FileName,Date,Length
$myobj.FileName += $matches.FileName
$myobj.Date = get-date $matches.Date
$myobj.Length = $matches.Length
$files += $myobj
}
}
if($All)
{
foreach($file in $files)
{
$FileName = $file.FileName
Try
{
Write-Verbose " Downloading File [$FileName] to [$Path]"
$webclient.DownloadFile("http://live.sysinternals.com/$FileName","$path\$FileName")
Write-Verbose " ==> Downloaded [$FileName]"
if($passthru){Get-Item "$path\$FileName"}
}
catch
{
Write-Verbose " Failed to Download File [$File]"
}
}
}
else
{
$files
}
}
}
}</a>
tshell :: Mar.16.2009 :: All :: 2 Comments »
If you haven’t figure this out yet or somehow missed it on my blog. MS is putting a HUGE amount of effort towards Powershell. We are talking dozens and dozens of groups at MS working with Powershell.
Just to let you know how important it is to Microsoft… Check this out
Jeffrey gets Distinguished Engineer
That may not mean much to you… but that is HUGE. There not many (like 36) Distinguished Engineers at MS. It is a huge honor and a testament to the value MS puts in Jeffrey and on Powershell.
tshell :: Mar.16.2009 :: All :: 1 Comment »
A few more changes from Beta to RC…
I think I will use most of the new features but of course I think this is the best
By default PowerShell in Beta launched a streamlined console. Customers could load optional modules via distinct shortcuts in the Start Menu. We heard from you that this was a confusing experience. Additionally, PowerShell did not surface a way to launch related tasks such as the Integrated Scripting Environment (ISE) from within their console experience. PowerShell now has a robust Jump List that affords a method to load modules, launch the ISE and open documentation.
tshell :: Mar.13.2009 :: All :: No Comments »
The GPO Guy just announced
“Just a quick shout-out to let folks know that I posted an update to our SDM Software GPMC Cmdlets on our Freeware page. This is version 1.3 and primarily just fixes some bugs including an issue when you tried to get, add or remove site-based GPO links. Enjoy!”
So… go enjoy!
tshell :: Mar.13.2009 :: All :: No Comments »
SAPIEN brings PowerShell Help to iPhone (iPowershell)
SO COOL!
tshell :: Mar.12.2009 :: All :: No Comments »
It has be refaced and rebranded as The Experts Community located HERE!
It is using a new community site engine called cahoots. Stop by and check it out!
tshell :: Mar.12.2009 :: All :: No Comments »
Read it, know it, love it!
Effective Powershell
tshell :: Mar.10.2009 :: All :: 2 Comments »
Windows Key Management Services (aka KMS, Volume Activation 2.0) does INDEED run on Windows 2008 Server Core. I could not find this information anywhere so I tried it and it worked ( I saw no reason why it wouldn’t.)
tshell :: Mar.09.2009 :: All :: No Comments »
Man was it good. The flow of information was outstanding. There were a ton of sessions I wanted to attend, but I couldn’t do everything so I basically split my time between the Powershell PG and Directory Services PG.
Now… I know your all saying “While I am glad you had a good time… tell me the good stuff!” I appreciate that. I am currently am waiting for an email from the PG’s letting me know what I can and cannot discuss.
tshell :: Mar.06.2009 :: All :: 1 Comment »