MSH>$sw = new-object System.Diagnostics.Stopwatch
MSH>$sw.start()
MSH>$sw.stop()
MSH>$sw
IsRunning Elapsed ElapsedMilliseconds ElapsedTicks
--------- ------- ------------------- ------------
False 00:00:06.1038371 6103 18312549030
MSH>$sw | gm
TypeName: System.Diagnostics.Stopwatch
Name MemberType Definition
---- ---------- ----------
Equals Method System.Boolean Equals(Object obj)
get_Elapsed Method System.TimeSpan get_Elapsed()
get_ElapsedMilliseconds Method System.Int64 get_ElapsedMilliseconds()
get_ElapsedTicks Method System.Int64 get_ElapsedTicks()
get_IsRunning Method System.Boolean get_IsRunning()
GetHashCode Method System.Int32 GetHashCode()
GetType Method System.Type GetType()
Reset Method System.Void Reset()
Start Method System.Void Start()
Stop Method System.Void Stop()
ToString Method System.String ToString()
Elapsed Property System.TimeSpan Elapsed {get;}
ElapsedMilliseconds Property System.Int64 ElapsedMilliseconds {get;}
ElapsedTicks Property System.Int64 ElapsedTicks {get;}
IsRunning Property System.Boolean IsRunning {get;}
MSH>
MSH>[system.math]::pow(2,32)
4294967296
MSH>[system.math] | gm
TypeName: System.RuntimeType
MSH>[system.math] | gm -static
TypeName: System.Math
Name MemberType Definition
---- ---------- ----------
Abs Method static System.Single Abs(Single value), static Sy...
Acos Method static System.Double Acos(Double d)
Asin Method static System.Double Asin(Double d)
Atan Method static System.Double Atan(Double d)
Atan2 Method static System.Double Atan2(Double y, Double x)
BigMul Method static System.Int64 BigMul(Int32 a, Int32 b)
Ceiling Method static System.Double Ceiling(Double a), static Sy...
Cos Method static System.Double Cos(Double d)
Cosh Method static System.Double Cosh(Double value)
DivRem Method static System.Int32 DivRem(Int32 a, Int32 b, Int3...
Equals Method static System.Boolean Equals(Object objA, Object ...
Exp Method static System.Double Exp(Double d)
Floor Method static System.Double Floor(Double d), static Syst...
IEEERemainder Method static System.Double IEEERemainder(Double x, Doub...
Log Method static System.Double Log(Double d), static System...
Log10 Method static System.Double Log10(Double d)
Max Method static System.SByte Max(SByte val1, SByte val2), ...
Min Method static System.SByte Min(SByte val1, SByte val2), ...
Pow Method static System.Double Pow(Double x, Double y)
ReferenceEquals Method static System.Boolean ReferenceEquals(Object objA...
Round Method static System.Double Round(Double a), static Syst...
Sign Method static System.Int32 Sign(SByte value), static Sys...
Sin Method static System.Double Sin(Double a)
Sinh Method static System.Double Sinh(Double value)
Sqrt Method static System.Double Sqrt(Double d)
Tan Method static System.Double Tan(Double a)
Tanh Method static System.Double Tanh(Double value)
Truncate Method static System.Decimal Truncate(Decimal d), static...
E Property static System.Double E {get;}
PI Property static System.Double PI {get;}
MSH>$host
Name : ConsoleHost
Version : 1.0.60319.0
InstanceId : 73fe5c33-31b9-4a9b-93d7-ff53183509cf
UI : System.Management.Automation.Internal.Host.InternalHostUserI
nterface
CurrentCulture : en-US
CurrentUICulture : en-US
PrivateData :
MSH>$host.ui.rawui
ForegroundColor : Gray
BackgroundColor : Black
CursorPosition : 0,980
WindowPosition : 0,920
CursorSize : 25
BufferSize : 80,9999
WindowSize : 80,61
MaxWindowSize : 80,77
MaxPhysicalWindowSize : 160,77
KeyAvailable : False
WindowTitle : /\/\o\/\/SH - C:\Documents and Settings\mow
MSH>$host.ui.rawui.set_ForegroundColor.OverloadDefinitions
System.Void set_ForegroundColor(ConsoleColor value)
MSH>
1 MSH>$host.ui.rawui.set_ForegroundColor(1)
2 Cannot convert argument "0", with value: "1", for "set_ForegroundColor" to type
3 "System.ConsoleColor".
4 At line:1 char:35
5 + $host.ui.rawui.set_ForegroundColor( <<<< 1)
6 MSH>$host.ui.rawui.set_ForegroundColor([system.consoleColor]"Red")
7 MSH>$host.ui.rawui.set_ForegroundColor([system.consoleColor]::gray)
8 MSH>$host.ui.rawui.set_ForegroundColor([system.consoleColor]"purple")
9 Cannot convert "purple" to "System.ConsoleColor" due to invalid enumeration val
10 ues. The possible enumeration values are "Black, DarkBlue, DarkGreen, DarkCyan,
11 DarkRed, DarkMagenta, DarkYellow, Gray, DarkGray, Blue, Green, Cyan, Red, Mage
12 nta, Yellow, White".
13 At line:1 char:57
14 + $host.ui.rawui.set_ForegroundColor([system.consoleColor]" <<<< purple")
15 MSH>$host.ui.rawui.set_ForegroundColor("Red")
16 MSH>[system.enum]::getnames([ConsoleColor])
17 Black
18 DarkBlue
19 DarkGreen
20 DarkCyan
21 DarkRed
22 DarkMagenta
23 DarkYellow
24 Gray
25 DarkGray
26 Blue
27 Green
28 Cyan
29 Red
30 Magenta
31 Yellow
32 White
33 MSH>[system.consoleColor] | gm -static
34
35
36 TypeName: System.ConsoleColor
37
38 Name MemberType Definition
39 ---- ---------- ----------
40 Equals Method static System.Boolean Equals(Object objA, Objec...
41 Format Method static System.String Format(Type enumType, Obje...
42 GetName Method static System.String GetName(Type enumType, Obj...
43 GetNames Method static System.String[] GetNames(Type enumType)
44 GetUnderlyingType Method static System.Type GetUnderlyingType(Type enumT...
45 GetValues Method static System.Array GetValues(Type enumType)
46 IsDefined Method static System.Boolean IsDefined(Type enumType, ...
47 Parse Method static System.Object Parse(Type enumType, Strin...
48 ReferenceEquals Method static System.Boolean ReferenceEquals(Object ob...
49 ToObject Method static System.Object ToObject(Type enumType, Ob...
50 Black Property static System.ConsoleColor Black {get;}
51 Blue Property static System.ConsoleColor Blue {get;}
52 Cyan Property static System.ConsoleColor Cyan {get;}
53 DarkBlue Property static System.ConsoleColor DarkBlue {get;}
54 ....
55
1 MSH>[system.console]::set_ForegroundColor("gray")
2 MSH>[system.console]::set_ForegroundColor
3 MSH>$host.UI.RawUI.set_ForegroundColor
4
5
6 MemberType : Method
7 OverloadDefinitions : {System.Void set_ForegroundColor(ConsoleColor value)}
8 TypeOfValue : System.Management.Automation.MshMethod
9 Value : System.Void set_ForegroundColor(ConsoleColor value)
10 Name : set_ForegroundColor
11 IsInstance : True
12
13
14
15 MSH>$host.UI.RawUI.set_ForegroundColor.OverloadDefinitions
16 System.Void set_ForegroundColor(ConsoleColor value)
17 MSH>[system.console] | gm -static fl
October 2005 November 2005 December 2005 January 2006 February 2006 March 2006 April 2006 May 2006 June 2006 July 2006 August 2006 September 2006 October 2006 November 2006 December 2006