$D='Scope 2'
&{
    $D = 'Scope 1'
    &{
        $D = 'Scope 0'
        class Test {
            Static $VarBloc = $D
            Static $VarScript = $script:D
            Static [string] Check()
            {
                return $script:D
            }
        }
        [Test]::VarBloc # Scope 0
        [Test]::VarScript # Scope 2
        [Test]::Check() # Scope 2
    }
}

$E = 'Scope 3'
&{
    $E = 'Scope 2'
    &{
        $E = 'Scope 1'
        &{
            $E = 'Scope 0'
            Get-Variable -Name E
            Get-Variable -Name E -Scope 1
            Get-Variable -Name E -Scope 2
            Get-Variable -Name E -Scope 3
        }
    }    
}