Appendix E. Selected .NET Classes and Their Uses

Tables E-1 through E-16 provide pointers to types in the.NET Framework that usefully complement the functionality that PowerShell provides. For detailed descriptions and documentation, search http://msdn.microsoft.com for the official documentation.

Table E-1. Windows PowerShells

Class

Description

System.Management.Automation.PSObject

Represents a PowerShell object to which you can add notes, properties, and more.

Table E-2. Utility

Class

Description

System.DateTime

Represents an instant in time, typically expressed as a date and time of day.

System.Guid

Represents a globally unique identifier (GUID).

System.Math

Provides constants and static methods for trigonometric, logarithmic, and other common mathematical functions.

System.Random

Represents a pseudorandom number generator, a device that produces a sequence of numbers that meet certain statistical requirements for randomness.

System.Convert

Converts a base data type to another base data type.

System.Environment

Provides information about, and means to manipulate, the current environment and platform.

System.Console

Represents the standard input, output, and error streams for console applications.

System.Text.RegularExpressions.Regex

Represents an immutable regular expression.

System.Diagnostics.Debug

Provides a set of methods and properties that help debug your code.

System.Diagnostics.EventLog

Provides interaction with Windows event logs.

System.Diagnostics.Process

Provides access to local and remote processes ...

Get Windows PowerShell Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.