пятница, 1 декабря 2017 г.

Список установленных обновлений с датами в Windows

wmic qfe list full /format:htable > hotfixes.html
wmic qfe list full | Select-String "InstalledOn"
$LastDetect = Get-ItemProperty -Path ‘HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\Results\Detect’ -Name LastSuccessTime | select -ExpandProperty LastSuccessTime
$LastInstall = Get-ItemProperty -Path ‘HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\Results\Install’ -Name LastSuccessTime | select -ExpandProperty LastSuccessTime
https://serverfault.com/questions/190690/find-installation-date-of-windows-updates

понедельник, 9 октября 2017 г.

PingTest.PS1

PingTest.PS1
$servers = "dc1","dc3","sql1","wds1","ex1"
Foreach($s in $servers)
{
  if(!(Test-Connection -Cn $s -BufferSize 16 -Count 1 -ea 0 -quiet))
  {
   "Problem connecting to $s"
   "Flushing DNS"
   ipconfig /flushdns | out-null
   "Registering DNS"
   ipconfig /registerdns | out-null
  "doing a NSLookup for $s"
   nslookup $s
   "Re-pinging $s"
     if(!(Test-Connection -Cn $s -BufferSize 16 -Count 1 -ea 0 -quiet))
      {"Problem still exists in connecting to $s"}
       ELSE {"Resolved problem connecting to $s"} #end if
   } # end if
} # end foreach



https://blogs.technet.microsoft.com/heyscriptingguy/2012/02/24/use-powershell-to-test-connectivity-on-remote-servers/

Работа с Wifi через командную строку

Netsh WLAN show profiles

Netsh WLAN show drivers

Netsh WLAN show wirelesscapabilities

Netsh WLAN show interfaces

Netsh WLAN show profile name="Profile_Name" key=clear

Netsh WLAN set profileparameter name="Profile_Name" connectionmode=manual

Netsh WLAN set profileparameter name=" Profile_Name" connectionmode=auto

Netsh WLAN delete profile name="Profile_Name"

Netsh WLAN export profile key=clear folder="Folder_Path"

Netsh WLAN export profile name="Profile_Name" key=clear folder="Folder_Path"

Netsh WLAN add profile filename="File_Path.XML"