Selected .NET Classes, and Their Uses

This appendix provides pointers to classes in the .NET Framework that provide useful functionality in addition to what PowerShell provides. For detailed descriptions and documentation, search the official documentation at http://msdn.microsoft.com.

Windows PowerShell

Class

Description

System.Management.Automation.PSObject

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

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 pseudo-random number generator, a device that produces a sequence of numbers that meet certain statistical requirements for randomness.

System.Convert

Converts a base datatype to another base datatype.

System.Environment

Provides information about, and means to manipulate, the current environment and platform. This class cannot be inherited.

System.Console

Represents the standard input, output, and error streams for console applications. This class cannot be inherited.

System.Text.RegularExpressions.Regex

Represents an immutable regular expression.

System.Diagnostics.Debug

Provides a set of methods and properties that help debug your code. This class cannot be inherited.

System.Diagnostics.EventLog

Provides interaction with Windows event logs.

System.Diagnostics.Process ...

Get Windows PowerShell Quick Reference 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.