Skip to content

Commit e432069

Browse files
pedrosousaelithrar
authored andcommitted
[Docs] Update PowerShell code blocks (#16978)
1 parent 7417684 commit e432069

File tree

13 files changed

+90
-83
lines changed

13 files changed

+90
-83
lines changed

src/content/docs/cloudflare-one/connections/connect-devices/warp/configure-warp/route-traffic/warp-architecture.mdx

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@ resolver #2
111111
On Windows, open a PowerShell window and run `ipconfig`. The DNS servers should be set to WARP's local DNS proxy IPs.
112112

113113
```powershell
114-
PS C:\> ipconfig
114+
ipconfig
115115
```
116116

117-
```powershell {15-16} output
117+
```txt {15-16} output
118118
Windows IP Configuration
119119
120120
Unknown adapter CloudflareWARP:
@@ -200,11 +200,10 @@ utun3: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1280
200200
On Windows, run `ipconfig`. When WARP is turned on, you will see an adapter called `CloudflareWARP` with IP address `172.16.0.2`.
201201

202202
```powershell
203-
PS C:\> ipconfig
203+
ipconfig
204204
```
205205

206-
```powershell {12} output
207-
206+
```txt {12} output
208207
Windows IP Configuration
209208
210209
Unknown adapter CloudflareWARP:
@@ -299,11 +298,10 @@ To view the entire routing table on Windows, run `netstat -r`.
299298
You can also search the routing table for an IP address. In this example, we see that traffic to `1.1.1.1` is sent through the WARP virtual interface:
300299

301300
```powershell
302-
PS C:\> Find-NetRoute -RemoteIPAddress "1.1.1.1" | Select-Object InterfaceAlias -Last 1
301+
Find-NetRoute -RemoteIPAddress "1.1.1.1" | Select-Object InterfaceAlias -Last 1
303302
```
304303

305-
```powershell output
306-
304+
```txt output
307305
InterfaceAlias
308306
--------------
309307
CloudflareWARP
@@ -312,11 +310,10 @@ CloudflareWARP
312310
In contrast, this DHCP address is excluded from WARP and uses the default interface:
313311

314312
```powershell
315-
PS C:\> Find-NetRoute -RemoteIPAddress "169.254.0.0" | Select-Object InterfaceAlias -Last 1
313+
Find-NetRoute -RemoteIPAddress "169.254.0.0" | Select-Object InterfaceAlias -Last 1
316314
```
317315

318-
```powershell output
319-
316+
```txt output
320317
InterfaceAlias
321318
--------------
322319
Wi-Fi

src/content/docs/cloudflare-one/connections/connect-devices/warp/deployment/mdm-deployment/index.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,18 @@ To uninstall the WARP client:
4242
1. First, locate the `.msi` package with the following PowerShell command:
4343

4444
```powershell
45-
PS C:\Users\JohnDoe> Get-WmiObject Win32_Product | Where-Object { $_.Name -match "WARP" } | Sort-Object -Property Name | Format-Table IdentifyingNumber, Name, LocalPackage -AutoSize
45+
Get-WmiObject Win32_Product | Where-Object { $_.Name -match "WARP" } | Sort-Object -Property Name | Format-Table IdentifyingNumber, Name, LocalPackage -AutoSize
46+
```
4647

48+
```txt output
4749
IdentifyingNumber Name LocalPackage
4850
----------------- ---- ------------
4951
{5RA4DJWK-13D8-2NSX-QRF8-UANLODWD6D90} Cloudflare WARP C:\WINDOWS\Installer\3f476db.msi
5052
```
5153

5254
2. You can then use the LocalPackage output in the uninstall command. For example,
5355

54-
```bash
56+
```powershell
5557
msiexec /x C:\WINDOWS\Installer\<WARP_RELEASE>.msi /quiet
5658
```
5759

src/content/docs/cloudflare-one/connections/connect-devices/warp/troubleshooting/known-limitations.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ To work around the issue, specify the IPv4 address of the [WARP local DNS proxy]
4040
C:\Users\JohnDoe>nslookup google.com 127.0.2.2
4141
```
4242

43-
Alternatively, use Powershell:
43+
Alternatively, use PowerShell:
4444

4545
```powershell
46-
PS C:\Users\JohnDoe> Resolve-DnsName -Name google.com
46+
Resolve-DnsName -Name google.com
4747
```
4848

4949
## 4G/5G embedded modules

src/content/docs/cloudflare-one/connections/connect-networks/deploy-tunnels/tunnel-with-firewall.mdx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,10 @@ On Windows, you can use PowerShell commands if `dig` is not available.
182182
To test DNS:
183183

184184
```powershell
185-
PS C:\Windows\system32> Resolve-DnsName -Name _v2-origintunneld._tcp.argotunnel.com SRV
185+
Resolve-DnsName -Name _v2-origintunneld._tcp.argotunnel.com SRV
186+
```
186187

188+
```txt output
187189
Name Type TTL Section NameTarget Priority Weight Port
188190
---- ---- --- ------- ---------- -------- ------ ----
189191
_v2-origintunneld._tcp.argotunnel.com SRV 112 Answer region2.v2.argotunnel.com 2 1 7844
@@ -193,8 +195,10 @@ _v2-origintunneld._tcp.argotunnel.com SRV 112 Answer region1.v2.a
193195
To test ports:
194196

195197
```powershell
196-
PS C:\Cloudflared\bin> tnc region1.v2.argotunnel.com -port 443
198+
tnc region1.v2.argotunnel.com -port 443
199+
```
197200

201+
```txt output
198202
ComputerName : region1.v2.argotunnel.com
199203
RemoteAddress : 198.41.192.227
200204
RemotePort : 443
@@ -204,8 +208,10 @@ TcpTestSucceeded : True
204208
```
205209

206210
```powershell
207-
PS C:\Cloudflared\bin> tnc region1.v2.argotunnel.com -port 7844
211+
tnc region1.v2.argotunnel.com -port 7844
212+
```
208213

214+
```txt output
209215
ComputerName : region1.v2.argotunnel.com
210216
RemoteAddress : 198.41.192.227
211217
RemotePort : 7844

src/content/docs/cloudflare-one/connections/connect-networks/downloads/update-cloudflared.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ To update `cloudflared` for a tunnel [created through the dashboard](/cloudflare
1818
Run the following command:
1919

2020
```powershell
21-
PS C:\> cloudflared update
21+
cloudflared update
2222
```
2323

2424
This updates `cloudflared` and automatically restarts the service.
@@ -139,14 +139,14 @@ Windows systems require services to have a unique name and display name. You can
139139
1. Install and configure `cloudflared`.
140140
2. Next, create a service with a unique name and point to the `cloudflared` executable and configuration file.
141141

142-
```bash
142+
```powershell
143143
sc.exe create <unique-name> binPath='<path-to-exe>' --config '<path-to-config>' displayname="Unique Name"
144144
```
145145

146146
3. Proceed to create additional services with unique names.
147147

148148
4. You can now start each unique service.
149149

150-
```bash
150+
```powershell
151151
sc.exe start <unique-name>
152152
```

src/content/docs/cloudflare-one/identity/devices/warp-client-checks/application-check.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ When setting up new device posture checks, we recommend first testing them witho
8686
2. Use the `Get-AuthenticodeSignature` command to find the thumbprint. For example:
8787

8888
```powershell
89-
PS C:\Users\JohnDoe> Get-AuthenticodeSignature -FilePath c:\myfile.exe
89+
Get-AuthenticodeSignature -FilePath c:\myfile.exe
9090
```
9191

9292
## Determine the SHA-256 value
@@ -108,7 +108,7 @@ The SHA-256 value almost always changes between versions of a file/application.
108108
2. Use the `get-filehash` command to find the SHA256 value of the file. For example:
109109

110110
```powershell
111-
PS C:\Users\JohnDoe> get-filehash -path "C:\myfile.exe" -Algorithm SHA256 | format-list
111+
get-filehash -path "C:\myfile.exe" -Algorithm SHA256 | format-list
112112
```
113113

114114
## How WARP checks for an application

src/content/docs/cloudflare-one/identity/devices/warp-client-checks/client-certificate.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,13 @@ You can use the following commands to check if a client certificate is properly
9191
2. To search the local machine trust store for a certificate with a specific common name, run the following command:
9292

9393
```powershell
94-
PS C:\Users\JohnDoe> Get-ChildItem Cert:\LocalMachine\My\ | where{$_.Subject -like "*<COMMON_NAME>*"}
94+
Get-ChildItem Cert:\LocalMachine\My\ | where{$_.Subject -like "*<COMMON_NAME>*"}
9595
```
9696

9797
3. To search the user trust store for a certificate with a specific common name, run the following command:
9898

9999
```powershell
100-
PS C:\Users\JohnDoe> Get-ChildItem Cert:\CurrentUser\My\ | where{$_.Subject -like "*<COMMON_NAME>*"}
100+
Get-ChildItem Cert:\CurrentUser\My\ | where{$_.Subject -like "*<COMMON_NAME>*"}
101101
```
102102

103103
</TabItem>

src/content/docs/cloudflare-one/identity/devices/warp-client-checks/firewall.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ macOS has two firewalls: an application-based firewall and a port-based firewall
6262
1. Open PowerShell and run:
6363

6464
```powershell
65-
PS C:\Users\JohnDoe> Get-NetFirewallProfile -PolicyStore ActiveStore -Name Public
65+
Get-NetFirewallProfile -PolicyStore ActiveStore -Name Public
6666
```
6767

6868
2. Verify that **Enabled** is `True`.

0 commit comments

Comments
 (0)