質問編集履歴
2
修正
title
CHANGED
File without changes
|
body
CHANGED
File without changes
|
1
文の修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
PowerShellのInvoke-WebRequestでrawcontentを取得した時
|
4
4
|
Select-Stringでエラーが出てしまいます。
|
5
|
+
どうすればいいのでしょうか?またなぜエラーが出るのでしょうか?
|
5
6
|
|
6
7
|
|
7
8
|
### 該当のソースコード
|
@@ -20,9 +21,10 @@
|
|
20
21
|
|
21
22
|
### 試したこと
|
22
23
|
いったんファイルに出力すればエラーなく実行できました。
|
24
|
+
```PowerShell
|
23
25
|
$rawcontent | Out-File "tes.txt"
|
24
26
|
Get-Content "tes.txt" | Select-String -Pattern "^Content-Type:" #②
|
25
|
-
|
27
|
+
```
|
26
28
|
ただ、ファイルに出力に使う文字コードを取得するためにSelect-Stringをしたいので
|
27
29
|
ファイルに出力してからではだめなのです。
|
28
30
|
|