PowerShell/PSCustomObject
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
-[[PSCustomObject について知りたかったことのすべて:https:...
-[[PowerShellのカスタムオブジェクト(PSCustomObject)の使...
-[[powershell : PSObject、Hashtable、およびPSCustomObject...
*結合 [#fe43bc1d]
-[[PowerShellでPSCustomObjectに複数のObjectを追加する:htt...
-[[(PowerShell) PSCustomObject をループさせつつキーと値の...
> $obj1 = [PSCustomObject]@{a=1;b=2;c=3}
> $obj2 = [PSCustomObject]@{d=4;e=5;f=6}
> foreach ($key in $obj1.psobject.properties.name) {Writ...
a = 1
b = 2
c = 3
> foreach ($key in $obj2.psobject.properties.name) {Writ...
d = 4
e = 5
f = 6
> $newObj = New-Object -TypeName PSObject
> foreach ($key in $obj1.psobject.properties.name) {$new...
> foreach ($key in $obj2.psobject.properties.name) {$new...
> $newObj | Get-Member | Out-Host -Paging
TypeName: System.Management.Automation.PSCustomObject
Name MemberType Definition
---- ---------- ----------
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetType Method type GetType()
ToString Method string ToString()
a NoteProperty int a=1
b NoteProperty int b=2
c NoteProperty int c=3
d NoteProperty int d=4
e NoteProperty int e=5
f NoteProperty int f=6
終了行:
-[[PSCustomObject について知りたかったことのすべて:https:...
-[[PowerShellのカスタムオブジェクト(PSCustomObject)の使...
-[[powershell : PSObject、Hashtable、およびPSCustomObject...
*結合 [#fe43bc1d]
-[[PowerShellでPSCustomObjectに複数のObjectを追加する:htt...
-[[(PowerShell) PSCustomObject をループさせつつキーと値の...
> $obj1 = [PSCustomObject]@{a=1;b=2;c=3}
> $obj2 = [PSCustomObject]@{d=4;e=5;f=6}
> foreach ($key in $obj1.psobject.properties.name) {Writ...
a = 1
b = 2
c = 3
> foreach ($key in $obj2.psobject.properties.name) {Writ...
d = 4
e = 5
f = 6
> $newObj = New-Object -TypeName PSObject
> foreach ($key in $obj1.psobject.properties.name) {$new...
> foreach ($key in $obj2.psobject.properties.name) {$new...
> $newObj | Get-Member | Out-Host -Paging
TypeName: System.Management.Automation.PSCustomObject
Name MemberType Definition
---- ---------- ----------
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetType Method type GetType()
ToString Method string ToString()
a NoteProperty int a=1
b NoteProperty int b=2
c NoteProperty int c=3
d NoteProperty int d=4
e NoteProperty int e=5
f NoteProperty int f=6
ページ名: