User Tools

Site Tools


script:powershell:equivalent

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

script:powershell:equivalent [2020/08/10 23:07]
127.0.0.1 external edit
script:powershell:equivalent [2021/06/01 17:39] (current)
admin
Line 34: Line 34:
 ===== Lire cache DNS ===== ===== Lire cache DNS =====
 **batch**: <​sxh>​ipconfig /​displaydns</​sxh>​\\ **batch**: <​sxh>​ipconfig /​displaydns</​sxh>​\\
-**Powershell**:​ <​sxh>​Get-DnsClientCache</​sxh>​\\+**Powershell**:​ <​sxh ​Powershell>​Get-DnsClientCache</​sxh>​\\
 ===== Nettoyer le cache DNS ===== ===== Nettoyer le cache DNS =====
 **batch**: <​sxh>​ipconfig /​flushdns</​sxh>​\\ **batch**: <​sxh>​ipconfig /​flushdns</​sxh>​\\
-**Powershell**:​ <​sxh>​Clear-DnsClientCache</​sxh>​\\+**Powershell**:​ <​sxh ​Powershell>​Clear-DnsClientCache</​sxh>​\\
  
 ===== DIR ===== ===== DIR =====
-<sxh>+<​sxh ​Powershell>
 Get-ChildItem -Recurse | Select-Object -ExpandProperty FullName Get-ChildItem -Recurse | Select-Object -ExpandProperty FullName
 gci -r | select -exp FullName gci -r | select -exp FullName
 </​sxh>​ </​sxh>​
-<sxh>+<​sxh ​Powershell>
 Get-ChildItem -Recurse | ForEach-Object { $_.FullName } Get-ChildItem -Recurse | ForEach-Object { $_.FullName }
 gci -r | % { $_.FullName } gci -r | % { $_.FullName }
 </​sxh>​ </​sxh>​
-<sxh>+<​sxh ​Powershell>
 Get-ChildItem -Recurse | ForEach-Object { $_.FullName } Get-ChildItem -Recurse | ForEach-Object { $_.FullName }
 gci -r | % FullName gci -r | % FullName
 </​sxh>​ </​sxh>​
 +
 +===== Ping =====
 +==== Test-NetConnection ====
 +<sxh Powershell>​
 +if (Test-Connection -TargetName Server01 -Quiet) { New-PSSession -ComputerName Server01 }
 +</​sxh>​
 +==== [System.Net.DNS] ====
 +
 +<sxh Powershell>​
 +[String]$ipAddress=192.168.1.100
 +[System.Net.DNS]::​Resolve($ipAddress)
 +</​sxh>​
 +
  
 ===== Echo ===== ===== Echo =====
script/powershell/equivalent.1597093676.txt.gz ยท Last modified: 2020/08/10 23:07 by 127.0.0.1