-
Recent Posts
Archives
- May 2012 (26)
- April 2012 (21)
- March 2012 (65)
- February 2012 (94)
- January 2012 (54)
- December 2011 (17)
- November 2011 (11)
- October 2011 (15)
- September 2011 (39)
- August 2011 (57)
- July 2011 (58)
- June 2011 (65)
- May 2011 (53)
- April 2011 (25)
- March 2011 (12)
- February 2011 (18)
- January 2011 (27)
- December 2010 (2)
- November 2010 (14)
- October 2010 (13)
- September 2010 (1)
- June 2010 (11)
- May 2010 (31)
- April 2010 (29)
- March 2010 (19)
- February 2010 (31)
- January 2010 (28)
- December 2009 (11)
- November 2009 (40)
- October 2009 (2)
- September 2009 (8)
- August 2009 (21)
- July 2009 (21)
- June 2009 (27)
- May 2009 (32)
- April 2009 (24)
- March 2009 (41)
- February 2009 (42)
- January 2009 (34)
- December 2008 (30)
- November 2008 (40)
- October 2008 (42)
- September 2008 (52)
- August 2008 (40)
- July 2008 (35)
- June 2008 (38)
- May 2008 (29)
- April 2008 (32)
- March 2008 (59)
- February 2008 (43)
- January 2008 (47)
- December 2007 (30)
- November 2007 (62)
- October 2007 (54)
- September 2007 (43)
- August 2007 (44)
- July 2007 (55)
- June 2007 (57)
- May 2007 (55)
- April 2007 (43)
- March 2007 (61)
- February 2007 (50)
- January 2007 (21)
- December 2006 (7)
- November 2006 (16)
Categories
- .NET
- Active Directory
- Active Directory administration with PowerShell
- Architecture
- BITS
- Books
- COM
- Deep Dive
- DHCP
- DNS
- Events
- Exchange
- File system
- files
- Firewall
- General
- General IT matters
- IT Community
- IT Security
- Learning Powershell
- Math
- Microsoft
- Networking
- Office 2010
- Opinion
- Outlook
- Philosophy
- Powershell
- PowerShell and Active Directory
- PowerShell and Exchange 2007
- PowerShell and IIS
- PowerShell and SQL Server
- PowerShell and WMI
- Powershell Basics
- PowerShell User Group
- PowerShell V2
- PowerShell V3
- PSAM
- Rant
- Science Fiction
- Script of the Week
- Scripting
- SQL Server
- Strings
- Technology
- Uncategorized
- Virtualisation
- Walking
- Windows 7
- Windows 8
- Windows 8 Server
- Windows Server 2008
- Windows Server 2008 R2
- WPF
- WSH
Meta
Twitter
- Preparing for the next UG meeting - PowerShell in Server 2012 - too much to choose from 1 week ago
- Reading about regular expressions in #PowerShell . My head is exploding 1 week ago
- Sat in San Diego airport waiting to fly home after an awesome deep dive 3 weeks ago
- #PowerShell Deep Dive is over. Another awesome event. It's the only place I learn something from every session 3 weeks ago
- #PowerShell v3 jobs give many more options - results available across sessions in many cases 3 weeks ago
Monthly Archives: October 2011
Reading the hosts file–revised
Quick revision to the post on reading the hosts file http://msmvps.com/blogs/richardsiddaway/archive/2011/10/23/reading-the-hosts-file.aspx. I wanted to be able to display the whole file function get-hostfilecontent { param ([switch]$all) $file = Join-Path -Path $($env:windir) -ChildPath “system32\drivers\etc\hosts” if (-not (Test-Path -Path $file)){ Throw “Hosts … Continue reading
Posted in Networking, PowerShell V2
Leave a comment
Multiple value query in WQL
A simple query that demonstrates how to query for multiple values. We want to stop the running services that are running where the names a like BITS and WinRm Get-WmiObject -Class Win32_Service -Filter “State=’Running’ AND Name LIKE ‘%BITS%’ OR Name … Continue reading
Posted in PowerShell and WMI
Leave a comment
Logging non-contactable systems
In this post – http://msmvps.com/blogs/richardsiddaway/archive/2011/10/23/1760058.aspx – I showed how to get the date of the last update applied to a system. A comment was posted asking how to log machines that can’t be contacted “.”, “rslaptop01″, “200.0.0.1″ | foreach { … Continue reading
Posted in PowerShell and WMI
Leave a comment
Clearing hosts file
We seen how to delete a single entry from the hosts file – this is how we clear all entries function clear-hostfilecontent { [CmdletBinding()] param () $file = Join-Path -Path $($env:windir) -ChildPath “system32\drivers\etc\hosts” if (-not (Test-Path -Path $file)){ Throw “Hosts … Continue reading
Posted in Networking, PowerShell V2
Leave a comment
PowerShell, Storage, WMI and Windows Server 8
A must read if you are interested in any of these http://blogs.technet.com/b/server-cloud/archive/2011/10/14/windows-server-8-standards-based-storage-management.aspx WMI is getting everywhere these days – better learn it quick
Remove a host file record
Next up is removing a record from a hosts file function remove-hostfilecontent { [CmdletBinding()] param ( [parameter(Mandatory=$true)] [ValidatePattern("\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b")] [string]$IPAddress, [parameter(Mandatory=$true)] [string]$computer ) $file = Join-Path -Path $($env:windir) -ChildPath “system32\drivers\etc\hosts” if (-not (Test-Path -Path $file)){ Throw “Hosts file not found” } … Continue reading
Posted in Networking, PowerShell V2
Leave a comment
Minor rant
Why do software suppliers – Adobe with Acrobat Reader & Oracle with Java are the worst culprits – insist on trying to install their browser toolbar & change my default search engine?? What’s worse is that they make the default … Continue reading
Hosts file – add a record
We’ve seen how to read the Hosts file – this is how we add a record function add-hostfilecontent { [CmdletBinding(SupportsShouldProcess=$true)] param ( [parameter(Mandatory=$true)] [ValidatePattern("\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b")] [string]$IPAddress, [parameter(Mandatory=$true)] [string]$computer ) $file = Join-Path -Path $($env:windir) -ChildPath “system32\drivers\etc\hosts” if (-not (Test-Path -Path $file)){ … Continue reading
Posted in Networking, PowerShell V2
1 Comment
PowerShell and WMI – new MEAP release
Four new chapters have been added to the MEAP (early access) for PowerShell and WMI Chapter 14 – Users and security Chapter 15 – Logs, jobs, and performance Chapter 16 – Hyper-V Chapter 17 – Windows Remote Management Chapter … Continue reading
Posted in PowerShell and WMI
Leave a comment
Reading the hosts file
Normally I ignore the Hosts file but my development laptop isn’t a member of my test domain – a number of reasons for this which I won’t go into. This means that when I want to RDP to a machine … Continue reading
Posted in Networking, PowerShell V2
Leave a comment