Skip to content

Commit 50a90de

Browse files
Adding parameter URI for Invoke-webrequest command
Adding parameter URI for Invoke-webrequest command
1 parent 9abe6cb commit 50a90de

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

articles/storage/common/storage-use-azcopy-v10.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ To obtain the link, run this command:
150150
| Operating system | Command |
151151
|--------|-----------|
152152
| **Linux** | `curl -s -D https://aka.ms/downloadazcopy-v10-linux \| grep ^Location` |
153-
| **Windows PowerShell** | `(Invoke-WebRequest https://aka.ms/downloadazcopy-v10-windows -MaximumRedirection 0 -ErrorAction SilentlyContinue).headers.location` |
154-
| **PowerShell 6.1+** | `(Invoke-WebRequest https://aka.ms/downloadazcopy-v10-windows -MaximumRedirection 0 -ErrorAction SilentlyContinue -SkipHttpErrorCheck).headers.location` |
153+
| **Windows PowerShell** | `(Invoke-WebRequest -Uri https://aka.ms/downloadazcopy-v10-windows -MaximumRedirection 0 -ErrorAction SilentlyContinue).headers.location` |
154+
| **PowerShell 6.1+** | `(Invoke-WebRequest -Uri https://aka.ms/downloadazcopy-v10-windows -MaximumRedirection 0 -ErrorAction SilentlyContinue -SkipHttpErrorCheck).headers.location` |
155155

156156
> [!NOTE]
157157
> For Linux, `--strip-components=1` on the `tar` command removes the top-level folder that contains the version name, and instead extracts the binary directly into the current folder. This allows the script to be updated with a new version of `azcopy` by only updating the `wget` URL.
@@ -164,15 +164,15 @@ wget -O azcopy_v10.tar.gz https://aka.ms/downloadazcopy-v10-linux && tar -xf azc
164164
```
165165
**Windows PowerShell**
166166
```PowerShell
167-
Invoke-WebRequest 'https://azcopyvnext.azureedge.net/release20220315/azcopy_windows_amd64_10.14.1.zip' -OutFile 'azcopyv10.zip'
167+
Invoke-WebRequest -Uri 'https://azcopyvnext.azureedge.net/release20220315/azcopy_windows_amd64_10.14.1.zip' -OutFile 'azcopyv10.zip'
168168
Expand-archive -Path '.\azcopyv10.zip' -Destinationpath '.\'
169169
$AzCopy = (Get-ChildItem -path '.\' -Recurse -File -Filter 'azcopy.exe').FullName
170170
# Invoke AzCopy
171171
& $AzCopy
172172
```
173173
**PowerShell 6.1+**
174174
```PowerShell
175-
Invoke-WebRequest 'https://azcopyvnext.azureedge.net/release20220315/azcopy_windows_amd64_10.14.1.zip' -OutFile 'azcopyv10.zip'
175+
Invoke-WebRequest -Uri 'https://azcopyvnext.azureedge.net/release20220315/azcopy_windows_amd64_10.14.1.zip' -OutFile 'azcopyv10.zip'
176176
$AzCopy = (Expand-archive -Path '.\azcopyv10.zip' -Destinationpath '.\' -PassThru | where-object {$_.Name -eq 'azcopy.exe'}).FullName
177177
# Invoke AzCopy
178178
& $AzCopy

0 commit comments

Comments
 (0)