回答編集履歴

2

出力の修正

2021/08/26 05:46

投稿

jc-somu
jc-somu

スコア2

test CHANGED
@@ -62,17 +62,17 @@
62
62
 
63
63
  PS> Get-WmiObject Win32_GroupUser | `
64
64
 
65
- >> Select-Object GroupComponent, PartComponent | `
65
+ Select-Object GroupComponent, PartComponent | `
66
66
 
67
- >> ForEach-Object -process { `
67
+ ForEach-Object -process { `
68
68
 
69
- >> $g = ($_.GroupComponent -replace '.+Name="([^"]+)"', '$1'); `
69
+ $g = ($_.GroupComponent -replace '.+Name="([^"]+)"', '$1'); `
70
70
 
71
- >> $u = ($_.PartComponent -replace '.+Name="([^"]+)"', '$1'); `
71
+ $u = ($_.PartComponent -replace '.+Name="([^"]+)"', '$1'); `
72
72
 
73
- >> Write-Output "$g,$u"; `
73
+ Write-Output "$g,$u"; `
74
74
 
75
- >> } | ConvertFrom-Csv -header group,user -Delimiter ","
75
+ } | ConvertFrom-Csv -header group,user -Delimiter ","
76
76
 
77
77
 
78
78
 

1

表示修正

2021/08/26 05:46

投稿

jc-somu
jc-somu

スコア2

test CHANGED
@@ -42,17 +42,17 @@
42
42
 
43
43
 
44
44
 
45
- GroupComponent PartComponent
45
+ GroupComponent PartComponent
46
46
 
47
- -------------- -------------
47
+ -------------- -------------
48
48
 
49
- \PC-HOGE\root\cimv2:Win32_Group.Domain="PC-HOGE",Name="Administrators" \PC-HOGE\root\cimv2:Win32_UserAccount.Domain="PC-HOGE",Name="Administrator"
49
+ \PC-HOGE\root\cimv2:Win32_Group.Domain="PC-HOGE",Name="Administrators" \PC-HOGE\root\cimv2:Win32_UserAccount.Domain="PC-HOGE",Name="Administrator"
50
50
 
51
- \PC-HOGE\root\cimv2:Win32_Group.Domain="PC-HOGE",Name="Users" \PC-HOGE\root\cimv2:Win32_UserAccount.Domain="PC-HOGE",Name="fuga"
51
+ \PC-HOGE\root\cimv2:Win32_Group.Domain="PC-HOGE",Name="Users" \PC-HOGE\root\cimv2:Win32_UserAccount.Domain="PC-HOGE",Name="fuga"
52
52
 
53
- \PC-HOGE\root\cimv2:Win32_Group.Domain="PC-HOGE",Name="Users" \PC-HOGE\root\cimv2:Win32_UserAccount.Domain="PC-HOGE",Name="fsuser01"
53
+ \PC-HOGE\root\cimv2:Win32_Group.Domain="PC-HOGE",Name="Users" \PC-HOGE\root\cimv2:Win32_UserAccount.Domain="PC-HOGE",Name="fsuser01"
54
54
 
55
- \PC-HOGE\root\cimv2:Win32_Group.Domain="PC-HOGE",Name="docker-users" \PC-HOGE\root\cimv2:Win32_UserAccount.Domain="PC-HOGE",Name="fuga"
55
+ \PC-HOGE\root\cimv2:Win32_Group.Domain="PC-HOGE",Name="docker-users" \PC-HOGE\root\cimv2:Win32_UserAccount.Domain="PC-HOGE",Name="fuga"
56
56
 
57
57
  \PC-HOGE\root\cimv2:Win32_Group.Domain="PC-HOGE",Name="HelpLibraryUpdaters" \PC-HOGE\root\cimv2:Win32_UserAccount.Domain="PC-HOGE",Name="fuga"
58
58