Generate PC Lists

One easy way of creating lists of PC names or IP address ranges etc is a simple pipeline like this:

1..40 | Foreach-Object { 'PC-W7-A{0:000}' -f $_ }

Use the -f operator to format the number. In this example, it will always be three-digit.

Twitter This Tip! ReTweet this Tip!


Posted Apr 19 2010, 08:00 AM by ps1

Comments

Twitter Trackbacks for Generate PC Lists - Power Tips - PowerShell.com [powershell.com] on Topsy.com wrote Twitter Trackbacks for Generate PC Lists - Power Tips - PowerShell.com [powershell.com] on Topsy.com
on 04-19-2010 10:29 AM

Pingback from  Twitter Trackbacks for                 Generate PC Lists - Power Tips - PowerShell.com         [powershell.com]        on Topsy.com

Continue to run and non-stop ?? Blog Archive ?? Approved fuel cell … | Alternative Fuel Automotive Wisdom wrote Continue to run and non-stop ?? Blog Archive ?? Approved fuel cell … | Alternative Fuel Automotive Wisdom
on 04-21-2010 6:40 AM

Pingback from  Continue to run and non-stop ?? Blog Archive ?? Approved fuel cell … | Alternative Fuel Automotive Wisdom

Concentrated Tech NSoftware Dell Compellent Sponsored by Idera and Concentrated Tech and NSoftware and Dell Compellent
Copyright 2011 PowerShell.com. All rights reserved.