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
Richard Siddaway's Blog
Share
|
Recent Posts
Where-object in PowerShell v3
UK PowerShell group–next two meetings
Using Invoke-WmiMethod to set the DNS servers
TCP/IP Alternative Configurations: pt IV reset to static address
TCP/IP Alternative Configurations: pt III set the alternative configuration
Archives
May 2012 (23)
April 2012 (21)
March 2012 (65)
February 2012 (94)
January 2012 (53)
December 2011 (17)
November 2011 (11)
October 2011 (15)
September 2011 (39)
August 2011 (57)
July 2011 (58)
June 2011 (65)
May 2011 (6)
Tags
.NET
Active Directory
Books
COM
Deep Dive
File System
IT Security
Networking
Office 2010
Outlook
Powershell
PowerShell and Active Directory
PowerShell and SQL Server
PowerShell and WMI
PowerShell Basics
PowerShell User Group
PowerShell V2
PowerShell V3
Remoting
Scripting Games
Strings
Technology
Windows 7
Windows Server 2008 R2
Windows Server 8
View more
Sort by:
Most Recent
|
Most Viewed
|
Most Commented
Where-object in PowerShell v3
Where-Object – aliased to where, but never, ever, ever, ever to ? – had a very simple syntax in PowerShell v2 Where-Object [-FilterScript] <scriptblock> [-InputObject <psobject>] [<CommonParameters>] It was normally used as Get-Process...
Published
Tue, May 22 2012 2:32 PM
by
Richard Siddaway's Blog
Filed under:
PowerShell V3
UK PowerShell group–next two meetings
29 May 2012 PowerShell and Windows server 2012 – new functionality pt 2 http://msmvps.com/blogs/richardsiddaway/archive/2012/05/08/uk-powershell-group-may-2012.aspx 4 July Jonathan Medd XenDesktop and PowerShell This will be at the slightly later...
Published
Mon, May 21 2012 2:55 PM
by
Richard Siddaway's Blog
Filed under:
PowerShell User Group
Using Invoke-WmiMethod to set the DNS servers
In the last post I showed that there was an issue with the way the SetDNSServerSearchOrder of the Win32_NetworkAdapterConfiguration class worked This would work $nic = Get-WmiObject -Class Win32_NetworkAdapterConfiguration -Filter "Index=7"...
Published
Sun, May 20 2012 1:41 PM
by
Richard Siddaway's Blog
Filed under:
PowerShell V2
,
PowerShell and WMI
,
Networking
,
PowerShell V3
TCP/IP Alternative Configurations: pt IV reset to static address
At some stage we may need to reset our NIC back to having a static address $index = 7 $nic = Get-WmiObject -Class Win32_NetworkAdapterConfiguration ` -Filter "Index=$index" $ipaddress = @( "10.10.54.202" ) $subnet = @( "255.255...
Published
Sun, May 20 2012 5:33 AM
by
Richard Siddaway's Blog
Filed under:
PowerShell and WMI
,
Networking
TCP/IP Alternative Configurations: pt III set the alternative configuration
We have seen how to set the NIC to use DHCP to get its address. This post shows how to set the alternative configuration on the NIC. If you just want APIPA then do nothing – other wise use this script $HKLM = 2147483650 #HKEY_LOCAL_MACHINE...
Published
Fri, May 18 2012 3:01 PM
by
Richard Siddaway's Blog
Filed under:
PowerShell V2
,
Networking
,
PowerShell V3
Advanced PowerShell v3 book
Three new chapters are added to the MEAP – Manning Early Access Program Chapter 3 – Using the PowerShell help system – includes PowerShell v3 Updateable help Chapter 5 – Working with PSsnapins and Modules Chapter 9 – Formatting www.manning.com...
Published
Fri, May 18 2012 1:06 PM
by
Richard Siddaway's Blog
Filed under:
Books
,
PowerShell V3
1 millionth hit
This blog had its 1 millionth hit yesterday. Thank you to everyone who takes the time to read my posts Read More...
Published
Fri, May 18 2012 11:38 AM
by
Richard Siddaway's Blog
Filed under:
General
Scripting Games 2012 comments: #20 multiple ifs
An if statement is used to test a condition and if is true do one thing and do another if it is false. It can be written generically as if (<condition>){ do stuff} else {do other stuff} Sometimes we need to test numerous alternatives. We could use...
Published
Thu, May 17 2012 2:03 PM
by
Richard Siddaway's Blog
Filed under:
Powershell
,
Scripting Games
TCP/IP Alternative Configuration: pt II Set DHCP
The next step on our journey to an alternative configuration is setting the NIC to use DHCP I will keep cheating for now and specify the NIC – on my machine I now it is the NIC whose Win32_NetworkAdapterConfiguration has an Index of 7 $index = 7 Get-WmiObject...
Published
Wed, May 16 2012 4:14 PM
by
Richard Siddaway's Blog
Filed under:
PowerShell and WMI
,
Networking
,
Powershell
Scripting Games 2012 comments: #19 default parameters
I often saw scripts that did something like this function test1 { param ( [string] $computername ) if ( ! $computername ) { $computername = $env:COMPUTERNAME } Get-WmiObject -Class Win32_OperatingSystem -ComputerName $computername } A function, or script...
Published
Wed, May 16 2012 2:48 PM
by
Richard Siddaway's Blog
Filed under:
PowerShell Basics
,
Scripting Games
Scripting Games 2012 comments: #18 computer names
I have mentioned computer names a few times. One oddity is accessing the local machine. There are three options dot . localhost $env:COMPUTERNAME There are a number of occasions when . and localhost fail. For example PS> Get-EventLog -List -ComputerName...
Published
Tue, May 15 2012 4:28 PM
by
Richard Siddaway's Blog
Filed under:
PowerShell Basics
,
Scripting Games
Test-Connection on PowerShell v3
Following on from the previous post I performed the same tests on PowerShell v3 The behaviour is the same except that Test-Connection -ComputerName . -Count 4 –AsJob now give the 4 pings when you receive the job information Read More...
Published
Tue, May 15 2012 12:34 PM
by
Richard Siddaway's Blog
Filed under:
PowerShell and WMI
,
PowerShell V3
Test-Connection oddities
I’ve playing around with Test-Connection because I wanted to set up a long running WMI based job and I thought that pinging a machine lots of times would be a good way to do it. Test-Connection uses the Win32-PingStatus class. I started with this PS>...
Published
Mon, May 14 2012 4:24 PM
by
Richard Siddaway's Blog
Filed under:
PowerShell and WMI
Scripting Games 2012 comments: #17 opening a csv file
Some of the events involved creating a CSV file. While it wasn’t explicitly asked that you opened the file many entrants chose to add that code to their scripts. There were a number of options presented – most involving opening Excel and importing the...
Published
Mon, May 14 2012 12:23 PM
by
Richard Siddaway's Blog
Filed under:
PowerShell Basics
,
Scripting Games
Scripting Games 2012 comments: #16 reading environmental variables
Windows maintains a set of environmental variables. Some, but not all, can be seen via the env: PowerShell drive Get-ChildItem -Path env: You can also use WMI to see some of the variables Get-WmiObject -Class Win32_Environment | ft Name, VariableValue...
Published
Sun, May 13 2012 12:24 PM
by
Richard Siddaway's Blog
Filed under:
PowerShell Basics
1
2
3
4
5
Next >
...
Last »
Copyright 2011 PowerShell.com. All rights reserved.