回答編集履歴
1
ミス
test
CHANGED
@@ -1,45 +1 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
[https://stackoverflow.com/questions/28156066/how-to-resolve-get-netconnectionprofile-provider-load-failure-on-x86-powershel](https://stackoverflow.com/questions/28156066/how-to-resolve-get-netconnectionprofile-provider-load-failure-on-x86-powershel)
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
下記のコードでGet-NetConnectionProfileコマンドが正常に動くか試して見て下さい。
|
8
|
-
|
9
|
-
```VBA
|
10
|
-
|
11
|
-
Sub Test_Sample_Miniature()
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
Dim WSH As Object
|
16
|
-
|
17
|
-
Dim cmdstr As String
|
18
|
-
|
19
|
-
Dim Result
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
Set WSH = CreateObject("WScript.Shell")
|
24
|
-
|
25
|
-
cmdstr = Chr(34) & "& {Get-NetConnectionProfile}" & Chr(34)
|
26
|
-
|
27
|
-
Result = WSH.Run("PowerShell -NoExit -nologo -ExecutionPolicy Bypass -Command " & cmdstr, 4, True)
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
Set WSH = Nothing
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
End Sub
|
36
|
-
|
37
|
-
```
|
38
|
-
|
39
|
-
Get-NetConnectionProfileをPowerShell32/64で動かした画像を添付いたします。
|
40
|
-
|
41
|
-

|
42
|
-
|
43
|
-

|
44
|
-
|
45
|
-
同様なエラーが出る様でしたら64bit版のVBAを利用すれば動くと思われます。
|
1
|
+
記入ミスです。削除します。
|