Sign in
|
Join PowerShell.com!
|
Help
Home
PowerTips
Ask the Experts
Forums
Webcasts
Blogs
eBookV2
Script Library
Twitter Grid
Modules
QuickClick
Scripts
Snippets
Videos
Library
»
Snippet Library
»
Conditions and Loops
»
Simple For
Simple For
Share
|
Browse Library
Module Library
QuickClick Library
Script Library
Snippet Library
ADSI
Comparison
Conditions and Loops
.Net
Exception Handlers
Files and Folders
Functions
Headers
Includes
Network
Pipeline
PowerShell Internals
Registry
Samples
Script Functions Templates
Security
SQL Server
Templates
User Management
WMI
Video Library
Members Only
Tags
Else
ElseIf
For
ForEach
If
If-Else
Select-Object
Snippet
While
View more
Previous
|
Next
|
View all files
|
View Slideshow
Download
posted by
Richard Giles
02-17-2009
Downloads: 263
File size: 994 B
Views: 699
Embed
Simple For
<?
xml
version
=
"1.0"
?>
<CodeSnippets xmlns
=
"http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"
>
<CodeSnippet Format
=
"1.0.0"
>
<Header>
<Title>Simple For<
/
Title>
<Shortcut>for<
/
Shortcut>
<Description>inserts simple for statement<
/
Description>
<Author
/
>
<SnippetTypes>
<SnippetType>Expansion<
/
SnippetType>
<
/
SnippetTypes>
<
/
Header>
<Snippet>
<Declarations>
<Literal>
<ID>param1<
/
ID>
<ToolTip
/
>
<Default>
$x
=
1<
/
Default>
<
/
Literal>
<Literal>
<ID>param2<
/
ID>
<ToolTip
/
>
<Default>
$x
-gt
10<
/
Default>
<
/
Literal>
<Literal>
<ID>param3<
/
ID>
<ToolTip
/
>
<Default>
$x
++
<
/
Default>
<
/
Literal>
<Literal>
<ID>param4<
/
ID>
<ToolTip
/
>
<Default>
$x
<
/
Default>
<
/
Literal>
<
/
Declarations>
<Code Language
=
"PowerShell"
Kind
=
"60"
><
!
[CDATA[for (
$param1
$;
$param2
$;
$param3
$) {
$param4
$
}]]><
/
Code>
<
/
Snippet>
<
/
CodeSnippet>
<
/
CodeSnippets>
Filed under:
Snippet
,
For
Inserts simple for statement
Copyright 2012 PowerShell.com. All rights reserved.