回答編集履歴

1

ミス

2020/06/17 01:25

投稿

tosi
tosi

スコア553

test CHANGED
@@ -1,45 +1 @@
1
- Get-NetConnectionProfileは32bitのPowerShellは動きせん
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
- ![イメージ説明](96b09f1642854654156c441e6c8cdd78.png)
42
-
43
- ![イメージ説明](8448fcd3745a3110afbc6db5b61a9f7d.png)
44
-
45
- 同様なエラーが出る様でしたら64bit版のVBAを利用すれば動くと思われます。
1
+ 記入ミスす。削除し