diff options
-rw-r--r-- | powershell.html.markdown | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/powershell.html.markdown b/powershell.html.markdown index 027320d5..e210d40a 100644 --- a/powershell.html.markdown +++ b/powershell.html.markdown @@ -149,6 +149,18 @@ $age = 22 "{0} said he is {1} years old." -f $name, $age # => "Steve said he is 22 years old" "$name's name is $($name.Length) characters long." # => "Steve's name is 5 characters long." +# Escape Characters in Powershell +# Many languages use the '\', but Windows uses this character for +# file paths. Powershell thus uses '`' to escape characters +# Take caution when working with files, as '`' is a +# valid character in NTFS filenames. +"Showing`nEscape Chars" # => new line between Showing and Escape +"Making`tTables`tWith`tTabs" # => Format things with tabs + +# Negate pound sign to prevent comment +# Note that the function of '#' is removed, but '#" is still present +`#Get-Process # => Fail: not a recognized cmdlet + # $null is not an object $null # => None @@ -709,19 +721,6 @@ $x=1 .{$x=2};$x # => 2 -# Escape Characters in Powershell -# Many languages use the '\', but Windows uses this character for -# file paths. Powershell thus uses '`' to escape characters -# Take caution when working with files, as '`' is a -# valid character in NTFS filenames. -"Showing`nEscape Chars" # => new line between Showing and Escape -"Making`tTables`tWith`tTabs" # +> Format things with tabs - -# Negate pound sign to prevent comment -# Note that the function of '#' is removed, but '#" is still present -`#Get-Process # => Fail: not a recognized cmdlet - - # Remoting into computers is easy Enter-PSSession -ComputerName RemoteComputer |