Windows
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
Windows 10 + .Net 3.5 install issue
Following command can be used to install .NET 3.5 on Windows 10 without internet connection: Dism.exe /online /enable-feature /featurename:NetFX3 /source:F:\sources\sxs /LimitAccess Where, F: is your installation media. Also, there’s tool to install .NET 3.5 offline from your existing Windows 10 installation media: http://www.techgainer.com/tools/net-framework-3-5-offline-installer-windows-10-8-x/ Source: http://answers.microsoft.com/en-us/insider/forum/insider_wintp-insider_install/how-to-instal-net-framework-35-on-windows-10/450b3ba6-4d19-45ae-840e-78519f36d7a4
Logoff inactive users
The first variant: use winexit.scr from Windows 2003 Toolkit. The minus: it doesn’t help if a user lock his account and another user is switched. The plus: there is an announcement and countdown. The worked solution: use iddlelogoff.exe from Intelliadmin (free): Download http://www.intelliadmin.com/idlelogoff.exe Open Group Policy Managment console and create a new policy for an […]
Powershell + turn on system protection
enable-computerrestore -drive “c:\” vssadmin resize shadowstorage /on=c: /for=c: /maxsize=3%