Windows
DNS server + memory consumption
In Windows Server 2008 R2 or older OS with MS08-037 patch installed, DNS server (dns.exe) consumes ridiculously large amount of precious memory. Under the hood, dns.exe opens more than 5000 UDP ports during start up, 2500 for UDP IPv4, 2500 for UDP IPv6. Large amount of kernel memory is also allocated for these ports. This can […]
Windows 10 + cannot install Intel Haxm + No VT detection
Disable the group policy setting that was used to enable Credential Guard.On the host operating system, click Start > Run, type gpedit.msc, and click Ok. The Local group Policy Editor opens. Go to Local Computer Policy > Computer Configuration > Administrative Templates > System > Device Guard > Turn on Virtualization Based Security. Select Disabled. […]
Windows 7 + shell commands for consoles
Shell commands list for Windows 7 Обнаружение беспроводных сетей – rundll32.exe van.dll,RunVAN Настройка беспроводной сети – RunDll32.exe shell32.dll,Control_RunDLL NetSetup.cpl,@0,WNSW Управление беспроводными сетями – explorer.exe shell:::{1fa9085f-25a2-489b-85d4-86326eedcd87} Архивация и восстановление – sdclt.exe /restorewizardadmin Восстановление файлов – sdclt.exe /restorewizard Настройка системы архивации – sdclt.exe /configure Добавление сетевого расположения – rundll32.exe shwebsvc.dll,AddNetPlaceRunDll Параметры индексирования – control.exe srchadmin.dll Настройка значков […]
Windows Update + CheckSUR
If you have issues with updating Windows or installing some components you can try CheckSUR: http://support.microsoft.com/kb/947821/en-us Using: DISM.exe /Online /Cleanup-image /Scanhealth DISM.exe /Online /Cleanup-image /Restorehealth or DISM.exe /Online /Restorehealth
Powershell + MySQL
Interesting script and MySQL connector for powershell: Script: Param( [Parameter( Mandatory = $true, ParameterSetName = ”, ValueFromPipeline = $true)] [string]$Query ) $MySQLAdminUserName = ‘username’ $MySQLAdminPassword = ‘password’ $MySQLDatabase = ‘MySQL-DB’ $MySQLHost = ‘MySQL-Host’ $ConnectionString = “server=” + $MySQLHost + “;port=3306;uid=” + $MySQLAdminUserName + “;pwd=” + $MySQLAdminPassword + “;database=”+$MySQLDatabase Try { [void][System.Reflection.Assembly]::LoadWithPartialName(“MySql.Data”) $Connection = New-Object MySql.Data.MySqlClient.MySqlConnection […]
Visual Studio 2017 + offline installer
There is the example how to create it: vs_community__144631470.1492700821.exe –layout D:\VS_Community2017
Windows Firewall + Too many entries in the eventlog
To turn off audit for these messages go to the GPO: Computer configuration –> Policies –> Windows settings –> Security settings –> Advanced audit policy configuration –> Audit policies –> Object access. “Audit Filtering Platform Connection” and check only the box next to “configure the following audit events.” DO NOT CLICK THE OTHER TWO BOXES. […]
Powershell + Get users from specified groups
$Groups = “ip”,”team”,”Managment”,”mott” ForEach ($Group in $Groups) { write-host “#” write-host “Group:” $Group write-host “===============================” $gr = Get-ADGroupMember -identity $group echo $gr.name write-host “===============================” }
Powershell + Logoff inactive users
We have shared PCs and some people leave their sessions locked. Their audio processes (Skype, players, etc …) still work and it’s the problem. I wrote the script which runs at a user logon and logoff these inactive users. function Get-Sessions { $queryResults = query session $starters = New-Object psobject -Property @{“SessionName” = 0; “UserName” […]
Powershell + Time elapsed
$sw = [Diagnostics.Stopwatch]::StartNew() ping -l 10 192.168.2.2 $sw.Stop() $sw.Elapsed $res = “Elapsed: ” + $sw.Elapsed.Hours + ” hours ” + $sw.Elapsed.Minutes + ” minutes ” + $sw.Elapsed.Seconds + ” seconds” echo $res