Skip to content

Instantly share code, notes, and snippets.

@rscarvalho
Created May 19, 2011 02:08
Show Gist options
  • Save rscarvalho/980030 to your computer and use it in GitHub Desktop.
Save rscarvalho/980030 to your computer and use it in GitHub Desktop.
# This is a comment
# Simple variable assignment
$variable = "assignment"
# Create instances of any object that is reachable by the .NET framework
$object = New-Object "System.Double"
# you can call static methods from classes using [Type]::MethodName()
[string]::Format("This is an {0} of string {1}", "string", "interpolation")
[double]::Parse("23.5")
# you can also use arrays
$simpleArray = @(1, 2, 3, 4)
# and dictionaries
$dict = @{"Key1" = "value1"; "Key2" = "value2"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment