PowerShell/コマンドレットのメソッドやプロパティなどを調べる方法
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
開始行:
#navi(../)
* コマンドレットのメソッドやプロパティなどを調べる方法 [#...
Get-Memberコマンドレットを利用することにより、コマンドレ...
#contents
#htmlinsertpcsp(win-top.html,win-sp.html)
* Get-Memberコマンドレットを使ってみる [#k1108fc4]
Get-Memberとパイプを使うことによりコマンドレットのメソッ...
以下、Get-Dateコマンドレットで試してみます。
- Get-Date | Get-Member 実行結果
PS C:\Users\sakura> Get-Date | Get-Member
TypeName: System.DateTime
Name MemberType Definition
---- ---------- ----------
Add Method System.DateTime Add(...
AddDays Method System.DateTime AddD...
AddHours Method System.DateTime AddH...
AddMilliseconds Method System.DateTime AddM...
AddMinutes Method System.DateTime AddM...
AddMonths Method System.DateTime AddM...
AddSeconds Method System.DateTime AddS...
AddTicks Method System.DateTime AddT...
AddYears Method System.DateTime AddY...
CompareTo Method int CompareTo(System...
Equals Method bool Equals(System.O...
GetDateTimeFormats Method string[] GetDateTime...
GetHashCode Method int GetHashCode()
GetType Method type GetType()
GetTypeCode Method System.TypeCode GetT...
IsDaylightSavingTime Method bool IsDaylightSavin...
Subtract Method System.TimeSpan Subt...
ToBinary Method long ToBinary()
ToFileTime Method long ToFileTime()
ToFileTimeUtc Method long ToFileTimeUtc()
ToLocalTime Method System.DateTime ToLo...
ToLongDateString Method string ToLongDateStr...
ToLongTimeString Method string ToLongTimeStr...
ToOADate Method double ToOADate()
ToShortDateString Method string ToShortDateSt...
ToShortTimeString Method string ToShortTimeSt...
ToString Method string ToString(), s...
ToUniversalTime Method System.DateTime ToUn...
DisplayHint NoteProperty Microsoft.PowerShell...
Date Property System.DateTime Date...
Day Property System.Int32 Day {ge...
DayOfWeek Property System.DayOfWeek Day...
DayOfYear Property System.Int32 DayOfYe...
Hour Property System.Int32 Hour {g...
Kind Property System.DateTimeKind ...
Millisecond Property System.Int32 Millise...
Minute Property System.Int32 Minute ...
Month Property System.Int32 Month {...
Second Property System.Int32 Second ...
Ticks Property System.Int64 Ticks {...
TimeOfDay Property System.TimeSpan Time...
Year Property System.Int32 Year {g...
DateTime ScriptProperty System.Object DateTi...
** Propertyの Year, Month, Day, Date を利用してみる。 [#n...
PS C:\Users\sakura> (Get-Date).Year
2012
PS C:\Users\sakura> (Get-Date).Month
5
PS C:\Users\sakura> (Get-Date).Day
23
PS C:\Users\sakura> (Get-Date).date
2012年5月23日 0:00:00
** Method の ToString を利用してみる。 [#n730fb14]
PS C:\Users\sakura> (Get-Date).ToString('yyyy-MM-dd')
2012-05-23
以上、Get-MemberでGet-Dateが返却する.NET Frameworkのオブ...
#htmlinsertpcsp(win-btm.html,win-sp.html)
終了行:
#navi(../)
* コマンドレットのメソッドやプロパティなどを調べる方法 [#...
Get-Memberコマンドレットを利用することにより、コマンドレ...
#contents
#htmlinsertpcsp(win-top.html,win-sp.html)
* Get-Memberコマンドレットを使ってみる [#k1108fc4]
Get-Memberとパイプを使うことによりコマンドレットのメソッ...
以下、Get-Dateコマンドレットで試してみます。
- Get-Date | Get-Member 実行結果
PS C:\Users\sakura> Get-Date | Get-Member
TypeName: System.DateTime
Name MemberType Definition
---- ---------- ----------
Add Method System.DateTime Add(...
AddDays Method System.DateTime AddD...
AddHours Method System.DateTime AddH...
AddMilliseconds Method System.DateTime AddM...
AddMinutes Method System.DateTime AddM...
AddMonths Method System.DateTime AddM...
AddSeconds Method System.DateTime AddS...
AddTicks Method System.DateTime AddT...
AddYears Method System.DateTime AddY...
CompareTo Method int CompareTo(System...
Equals Method bool Equals(System.O...
GetDateTimeFormats Method string[] GetDateTime...
GetHashCode Method int GetHashCode()
GetType Method type GetType()
GetTypeCode Method System.TypeCode GetT...
IsDaylightSavingTime Method bool IsDaylightSavin...
Subtract Method System.TimeSpan Subt...
ToBinary Method long ToBinary()
ToFileTime Method long ToFileTime()
ToFileTimeUtc Method long ToFileTimeUtc()
ToLocalTime Method System.DateTime ToLo...
ToLongDateString Method string ToLongDateStr...
ToLongTimeString Method string ToLongTimeStr...
ToOADate Method double ToOADate()
ToShortDateString Method string ToShortDateSt...
ToShortTimeString Method string ToShortTimeSt...
ToString Method string ToString(), s...
ToUniversalTime Method System.DateTime ToUn...
DisplayHint NoteProperty Microsoft.PowerShell...
Date Property System.DateTime Date...
Day Property System.Int32 Day {ge...
DayOfWeek Property System.DayOfWeek Day...
DayOfYear Property System.Int32 DayOfYe...
Hour Property System.Int32 Hour {g...
Kind Property System.DateTimeKind ...
Millisecond Property System.Int32 Millise...
Minute Property System.Int32 Minute ...
Month Property System.Int32 Month {...
Second Property System.Int32 Second ...
Ticks Property System.Int64 Ticks {...
TimeOfDay Property System.TimeSpan Time...
Year Property System.Int32 Year {g...
DateTime ScriptProperty System.Object DateTi...
** Propertyの Year, Month, Day, Date を利用してみる。 [#n...
PS C:\Users\sakura> (Get-Date).Year
2012
PS C:\Users\sakura> (Get-Date).Month
5
PS C:\Users\sakura> (Get-Date).Day
23
PS C:\Users\sakura> (Get-Date).date
2012年5月23日 0:00:00
** Method の ToString を利用してみる。 [#n730fb14]
PS C:\Users\sakura> (Get-Date).ToString('yyyy-MM-dd')
2012-05-23
以上、Get-MemberでGet-Dateが返却する.NET Frameworkのオブ...
#htmlinsertpcsp(win-btm.html,win-sp.html)
ページ名: