October 2017
Intermediate to advanced
440 pages
11h 47m
English
Many of the examples used in this chapter have involved typing the full namespace path to get to a class name. This requirement can be eased with the using keyword.
For example, if a script does a lot of work with the System.Net.NetworkInformation class, the requirement to type the namespace every time can be removed. This allows the System.Net.NetworkInformation.NetworkInterface class to be used with a much shorter type name:
using namespace System.Net.NetworkInformation
With this statement in place, classes can be used without the long namespace:
[NetworkInterface]::GetAllNetworkInterfaces()
If the namespace is present within an assembly which is not loaded by default, the using assembly command should be added first. ...
Read now
Unlock full access