Sign in
|
Join PowerShell.com!
|
Help
Home
PowerTips
Ask the Experts
Forums
Webcasts
Blogs
eBookV2
Script Library
Twitter Grid
Featured Posts
Dreaming in PowerShell
Don Jones
Code MarkUp Tool
Directory
The Lonely Administrator
»
All Tags
»
ScriptBlock
»
PowerShell
(
RSS
)
Browse by Tags
Share
|
Recent Posts
Skipping WMI System Properties in PowerShell
Friday Fun: 13 More Scriptblocks
PowerShell Scripting with [ValidateScript]
Scripting with PSCredential
Friday Fun What a CHAR!
Archives
May 2013 (10)
April 2013 (10)
March 2013 (6)
February 2013 (8)
January 2013 (15)
December 2012 (5)
November 2012 (7)
October 2012 (5)
September 2012 (2)
August 2012 (3)
July 2012 (4)
June 2012 (8)
May 2012 (11)
April 2012 (18)
March 2012 (2)
February 2012 (10)
January 2012 (12)
December 2011 (10)
November 2011 (15)
October 2011 (12)
September 2011 (4)
August 2011 (9)
July 2011 (8)
June 2011 (6)
May 2011 (10)
April 2011 (8)
Tags
CommandLine
Conferences
Friday Fun
FridayFun
Function
functions
Get-WMIObject
Google Plus
Group Policy
hashtable
Hyper-V
objects
Out-Gridview
parameter
PowerShell
Powershell 3.0
PowerShell ISE
PowerShell v2.0
ScriptBlock
Scripting
Training
Validation
Windows Server
WMI
Write-Host
View more
ACL
Array
ForEach-object
Friday Fun
FridayFun
Function
functions
Get-WMIObject
hashtable
Invoke-Command
parameter
password
PowerShell v2.0
Professional
PSCredential
Random
Scripting
security
Select-Object
Training
Validation
Where-Object
WMI
Write-Host
Skipping WMI System Properties in PowerShell
One of my favorite techniques when using WMI in PowerShell is to pipe an object to Select-Object and select all properties. Try this: get-wmiobject win32_bios | select * It works, but it also gets all of the system properties like … Continue...
Published
Wed, Apr 04 2012 8:15 AM
by
The Lonely Administrator
Filed under:
Scripting
,
WMI
,
PowerShell
,
ScriptBlock
,
Get-WMIObject
Friday Fun: 13 More Scriptblocks
In celebration of Friday the 13th I thought I would offer up a menu of 13 more script blocks. If you missed the first course, you can find the original 13 scrptblocks here. I’m not going to spend a lot … Continue reading → Read More...
Published
Fri, Apr 04 2012 9:34 AM
by
The Lonely Administrator
Filed under:
Scripting
,
WMI
,
PowerShell
,
Friday Fun
,
FridayFun
,
ScriptBlock
,
Random
,
ACL
,
password
PowerShell Scripting with [ValidateScript]
The last few days we’ve been looking at parameter validation attributes you might use in a script of function. Yesterday I wrote about [ValidateRange] and demonstrated how you might use it. That attribute works fine for any values that can …...
Published
Thu, Apr 04 2012 8:57 AM
by
The Lonely Administrator
Filed under:
Scripting
,
PowerShell
,
ScriptBlock
,
parameter
,
Validation
Scripting with PSCredential
I see this question often: how can I pass a parameter value for a PSCredential that might be a credential object or it might be a user name? In the past I’ve used code like this: begin { … Continue reading → Read More...
Published
Tue, Apr 04 2012 9:40 AM
by
The Lonely Administrator
Filed under:
functions
,
Scripting
,
WMI
,
PowerShell
,
ScriptBlock
,
PSCredential
,
security
Friday Fun What a CHAR!
Last week I posted a PowerShell snippet on Twitter. My original post piped an array of integers as [CHAR] type using an OFS. Don’t worry about that. As many people reminded me, it is much easier to use the -Join … Continue reading →...
Published
Fri, Sep 09 2011 9:00 AM
by
The Lonely Administrator
Filed under:
PowerShell
,
PowerShell v2.0
,
Friday Fun
,
FridayFun
,
ScriptBlock
,
hashtable
,
Array
The PowerShell Day Care: Building ScriptBlocks
Good morning kids and welcome to the PowerShell Day Care center. We offer a creative and nurturing environment for PowerShell professionals of all ages. Later there might even be juice and cookies. But first let’s get out our blocks, our …...
Published
Thu, Sep 09 2011 7:53 AM
by
The Lonely Administrator
Filed under:
Scripting
,
PowerShell
,
ScriptBlock
,
ForEach-object
Get Properties with Values
One of my nuisance issues when using WMI with Windows PowerShell, is that when looking at all properties I have to wade though many that have no value. I’d prefer to only view properties that have a populated value. Here’s … Continue...
Published
Mon, Jul 07 2011 9:43 AM
by
The Lonely Administrator
Filed under:
WMI
,
PowerShell
,
PowerShell v2.0
,
ScriptBlock
,
Where-Object
,
Select-Object
ScriptBlocks On the Fly
I’m always preaching about writing PowerShell scripts and functions with reuse and modularization in mind. You should never have to write the same block of code twice. But what about in the shell during your daily grind? Perhaps today you’re...
Published
Mon, Jun 06 2011 7:38 AM
by
The Lonely Administrator
Filed under:
Scripting
,
PowerShell
,
ScriptBlock
,
Invoke-Command
Friday Fun: Start-TypedDemo v2
Not too long ago I posted a function I wrote for doing PowerShell demonstrations. My goal was to simulate a live interactive demo but without the typing so I could focus on explaining and not typing. The first version was … Continue reading →...
Published
Fri, May 05 2011 8:28 AM
by
The Lonely Administrator
Filed under:
Scripting
,
PowerShell
,
Function
,
Training
,
PowerShell v2.0
,
Write-Host
,
Friday Fun
,
ScriptBlock
,
Professional
Copyright 2012 PowerShell.com. All rights reserved.