Professional Documents
Culture Documents
&$scriptblock
$scriptblock.Invoke()
$scriptblock.Invoke will show method definition
$array =1,2,3,4,5,
$array[1,3,-1]
$array[1..3]
(10..35) .GetType()
When you extend an array the computer copy the hole content of the array and create a new one to
which adds the new element
To get the memebers of the array object and not the one of the array memebrs:
Regular expression:
https://msdn.microsoft.com/en-us/library/az24scfc(v=vs.110).aspx
warning stream 3
Debug
Get-TraceSource
$code = @"
public class testclass{
public static string GetData(){
return "my text ";
}
}
"@
Will load in a few seconds but will have only one string in it.
Declarative language
Desired final state of the computer
doesnt need a domain to work
doesnt need network connectivity
Requires OS v4.0 v5.0 is recomanded
requires remoting
Get-DscResource
Get-DscResource -Name File -Syntax