background preloader

Powershell

Facebook Twitter

PowerShell Pro! PowerShell.nu | Windows PowerShell. ShowUI: Write-UI -in PowerShell. Start-Automating. A Taste Of PowerShell. Use PowerShell to Audit and Install Windows Patches - Hey, Scripting Guy! Blog. Summary: Learn how to use a free Windows PowerShell module to audit and install patches on Windows systems. Microsoft Scripting Guy Ed Wilson here. Today, I am proud to present a guest blog post written by Boe Prox. Boe has written a really cool module to audit and install software patches on Windows systems. Boe is currently a senior systems administrator with BAE Systems. He has been in the IT industry since 2003 and has spent the past three years working with VBScript and Windows PowerShell. He looks to script whatever he can, whenever he can.

<BoeProxDisclaimer>This post does not contain any code in it. Something that I have been working on for a little while as a work project is a way for other users in my shop to be able to patch our servers during a downtime without actually having to log into each server remotely to install the patches that have been downloaded from the local WSUS server. Enter the PowerShell Patch Audit/Installation GUI (PoshPAIG). Running the utility Ping sweep. Learn Powershell | Achieve More | What is this Powershell of which you speak about?

PowerShell Patch Audit/Installation GUI. Powershell and Excel. How do I create an Excel object? $a = new-object -comobject excel.application The Scripting Guys have a column about tab expansion with an Excel example. How do I make Excel visible? $a.Visible = $true How do I change the value of the active cell? $a.ActiveCell.Value2 = "x" How do I change the value of a specified cell? $a.ActiveSheet.Range("B1").Value2 = "y" How do I list the workbook's name? $wb.Name How do I write a list of files to Excel? $xl = new-object -comobject excel.application $xl.Visible = $true $wb = $xl.Workbooks.Add() $ws = $wb.Worksheets.Item(1) $row = 1 $s = dir $s | foreach -process ` $ws.Cells.Item($row,1) = $_; ` $row++ ` How do I write a list of processes to Excel? Function Release-Ref ($ref) { ([System.Runtime.InteropServices.Marshal]::ReleaseComObject([System.

[System.GC]::Collect() [System.GC]::WaitForPendingFinalizers() $excel = New-Object -comobject Excel.Application $excel.Visible = $True $workbook = $excel.Workbooks.Add() $worksheet = $workbook.Worksheets.Item(1) Release-Ref $range. Adam's AD Admin. Dmitry’s PowerBlog: PowerShell and beyond. Shay Levy. I’m a Microsoft MVP… Again June 30, 2013 It's that time of the year which feels like having a second birthday. I'm proud to announce that I was awarded the MVP title once again. This is my 6th year in a row as a PowerShell MVP, and hopefully not my last! Thank you all, Lechaim!! Improving the output of Update-Help December 20, 2012 Source: PowerShellMagazine.com If you’ve updated PowerShell to version 3.0 you probably noticed that help is no longer shipped in the box. Skipping empty CSV objects December 4, 2012 Hi, it’s been a while since my last post, I’ve been busy mostly at work and also by investing most of my time running the PowerShell Magazine website together with my friends.

Congratulations 2012 Microsoft MVP July 1, 2012 I’ve just received THE email from Microsoft… I’m a PowerShell MVP for another year! Deprecation of cmdlets April 30, 2012 Until PowerShell 3.0, if you shipped a cmdlet there was no good way to deprecate it. Creating objects with a cast in PowerShell 3.0 April 19, 2012.

Learning. Windows PowerShell Tip: Creating Formatted HTML Output. Here’s a quick tip on working with Windows PowerShell. These are published every week for as long as we can come up with new tips. If you have a tip you’d like us to share or a question about how to do something, let us know. Find more tips in the Windows PowerShell Tip of the Week archive. Creating Formatted HTML Output Pity the poor old cmdlet ConvertTo-HTML. When Windows PowerShell was first released everyone was excited about ConvertTo-HTML; after all, this cmdlet promised to make it easy to display script output as an HTML page.

And, to its credit, ConvertTo-HTML delivered; for example, this simple little script returns information about the services running on a computer, saves that information to a .HTM file, and then displays that file in a Web browser: Get-Service | Select-Object Status, Name, DisplayName | ConvertTo-HTML | Out-File C:\Scripts\Test.htm Invoke-Expression C:\Scripts\Test.htm So what’s wrong with that? Unless, of course, you give ConvertTo-HTML some help. Like what? Install the PSCX and 80 New Cmdlets to Ease PowerShell Use - Hey, Scripting Guy! Blog. Summary: Install the PSCX and get 80 new cmdlets to ease Windows PowerShell use.

Hey, Scripting Guy! You have been spending quite a bit of time recently talking about functions and modules and the like. What is the big deal, and where would I find such modules? Hello KF, Microsoft Scripting Guy Ed Wilson here. Things are pretty exciting around the Scripting House. It seems like the roofers are nearing completion of their project of repairing the storm damage we had, and our solar heater for the swimming pool is working out great. KF, because I am going to be spending so much time in front of the community in the next few weeks (I did not even mention the trip to Corpus Christy, Texas, or SQL Solstice in Raleigh), I thought it would be great to answer your question by using a community driven project. One thing to keep in mind is that by default, the user location for Windows PowerShell modules does not exist. $VistaPath = "$env:userProfile\documents\WindowsPowerShell\Modules"

Learn About Two CodePlex Projects: PS2EXE and RoboPowerCopy - Hey, Scripting Guy! Blog. Summary: Get the inside scoop on two awesome CodePlex projects: PS2EXE and RoboPowerCopy. Microsoft Scripting Guy Ed Wilson here. Today, we have a debut guest blogger. With us is Ingo Karstein to tell us about two of his CodePlex projects. Take it away, Ingo. This is Ingo Karstein writing for this famous blog today.

I’m a senior consultant for SharePoint, Windows PowerShell, and custom development. Plenty of times, I am faced with problems that can be solved by software tools that I develop on my own. These times are gone. In the last few weeks I developed two Windows PowerShell scripts: RoboPowerCopy and PS2EXE. Background on the tools RoboPowerCopy is an attempt to clone Robocopy in pure Windows PowerShell so that it runs on every machine without any prerequisites other than Windows PowerShell 2.0. Windows PowerShell provides a middle course.

Here is just a sample of using embedded C# code inside a Windows PowerShell script: Add-Type -TypeDefinition @” public static class Message { 1. 2.