February 2019
Intermediate to advanced
626 pages
15h 51m
English
A type accelerator is an alias for a type name. At the beginning of this chapter, the System.Management.Automation.PowerShell type was used. This type has an accelerator available. The accelerator allows the following notation to be used:
[PowerShell].Assembly
Another commonly used example is the ADSI accelerator. This represents the System.DirectoryServices.DirectoryEntry type. This means that the following two commands are equivalent:
[System.DirectoryServices.DirectoryEntry]"WinNT://$env:COMPUTERNAME" [ADSI]"WinNT://$env:COMPUTERNAME"
Getting the list of type accelerators isn't quite as easy as it should be. An instance of the TypeAccelerators type is required first. Once that has been retrieved, a static property called ...
Read now
Unlock full access