NIC Switch Script

This script enables you to enable and disable NIC’s as you wish. Make sure to run an elevated command prompt.

@echo off
cls
goto Choices

REM use this command to determine what the adapter index number is
REM wmic nic get name, index

:Top
choice /c:12
If ERRORLEVEL == 2 goto Disable_LAN
If ERRORLEVEL == 1 goto Enable_LAN
goto EOF

:1
:Enable_LAN
wmic path win32_networkadapter where index=14 call enable
goto :EOF

:2
:Disable_LAN
wmic path win32_networkadapter where index=14 call disable
goto :EOF

:Choices
echo 1 Enable LAN
echo 2 Disable LAN
goto Top

:EOF

How to run Outlook 2007/2010/2013/2016 Rules from a button

To be able to run a single (or all) rules from a single button instead of having to use the outlook rules dialogue box, the following code should help:


First, go into the VB Editor,  Tools -> Macro’s > Visual Basic Editor (or press ALT-F11)

Assuming you don’t already have any modules in here.  Press Insert -> Module

You will be presented with a new window waiting for code, paste this in for all rules:


Sub RunAllInboxRules()
Dim st As Outlook.Store
Dim myRules As Outlook.Rules
Dim rl As Outlook.Rule
Dim count As Integer
Dim ruleList As String
‘On Error Resume Next’ get default store (where rules live)
Set st = Application.Session.DefaultStore
‘ get rules
Set myRules = st.GetRules

‘ iterate all the rules
For Each rl In myRules
‘ determine if it’s an Inbox rule
If rl.RuleType = olRuleReceive Then
‘ if so, run it
rl.Execute ShowProgress:=True
count = count + 1
ruleList = ruleList & vbCrLf & rl.Name
End If
Next

‘ tell the user what you did
ruleList = “These rules were executed against the Inbox: ” & vbCrLf & ruleList
MsgBox ruleList, vbInformation, “Macro: RunAllInboxRules”

Set rl = Nothing
Set st = Nothing
Set myRules = Nothing
End Sub


The below is for a single rule, don’t forget to change rule name:


Sub RunAllInboxRules()
Dim st As Outlook.Store
Dim myRules As Outlook.Rules
Dim rl As Outlook.Rule
Dim runrule As String
dim rulename as string

Rulename = “*****name of rule*****”

Set st = Application.Session.DefaultStore

Set myRules = st.GetRules

For Each rl In myRules

If rl.RuleType = olRuleReceive Then

If rl.Name = rulename Then
rl.Execute ShowProgress:=True
runrule = rl.Name

End If
End If
Next

ruleList = “This rule was executed against the Inbox:” & vbCrLf & runrule
MsgBox ruleList, vbInformation, “Macro: RunAllInboxRules”

Set rl = Nothing
Set st = Nothing
Set myRules = Nothing
End Sub

Source: http://pyrocam.com/

Script for updating coretemp

This script assumes that wget is installed in %SYSTEMROOT%.

The purpose of this script is to quickly download, install (with default settings), and update coretemp to the latest version on a machine

 

wget http://www.alcpu.com/CoreTemp/Core-Temp-setup.exe -O %UserProfile%\Desktop\coretemp.exe

%UserProfile%\Desktop\coretemp.exe /sp /silent /closeapplications

START C:\”Program Files”\”Core Temp”\”Core Temp.exe”

del %UserProfile%\Desktop\coretemp.exe

exit

Google Chrome Scroll Anchoring

Scroll Anchoring is a new feature of Google Chrome 51 and newer that prevents visible jumps of the active page when offscreen content changes.

You may have experienced the following situation when using a browser like Google Chrome: you load a page and some text is loaded quickly. You begin to read the text and scroll a bit or a lot, and suddenly the page begins to scroll automatically as other elements, images or media, are added to the page.

You lose sight of the position you were at when that happens. This scroll jumping can be confusing, as you need to locate the position on the page when things started to jump around to continue reading.

These visible jumps, when you start to scroll while a page is loading, is problematic on the desktop, and maybe even more so on mobile devices.

Scroll Anchoring

google-chrome-scroll-anchoring

Scroll Anchoring has been designed to prevent these visible jumps from happening in Chrome. Basically, what the feature does is adjust the page in the background without jumping away from the part that is visible on the screen.

The feature is not enabled by default but part of the browser’s experimental flags. These features are not yet ready for prime time, or need further testing, before Google makes a decision whether to integrate it natively in Chrome or remove it again.

To enable scroll anchoring in Google Chrome, do the following:

  1. Make sure you are running at least Google Chrome 51. Easiest way to find out is to load chrome://version/ and check the version that is displayed.
  2. If that is the case, load chrome://flags/#enable-scroll-anchoring to jump directly to the preference.
  3. On mobile, you may find it easier to load chrome://flags and use the built-in search to find anchor to jump to it instead.
  4. Switch it to enabled to turn it on.
  5. Restart google Chrome to complete the change.

The feature is available for all desktop versions of Google Chrome, for Chrome OS and for Chrome on Android.

To turn it off again, repeat the process outlined above but switch the preference to disabled this time to do so.

Source: http://www.ghacks.net/

Using Process Monitor to measure logon times

FIrst Aid for it support

Did you ever get complaints about slow logon times for users running on a Terminal Server? Probably the answer is yes, but what is slow? And can I measure this with hard numbers? Yes you can do this… By using Process Monitor! And I will show you how.

Step 1

Logon to the server with the local Administrator account and start Process Monitor.

Stop the capture and clear everything, this prevents the ProcMon from using unnecessary resources for now.

ProcMon_captureEvents

Step 2

Edit the Filter as follows. Add the processes winlogon.exe, userinit.exe and explorer.exe

Also filter to only show process Start and Exit.

ProcMon_Filter

– Winlogon.exe: You can see the first process to kick of is the Winlogon.exe. It is starting on logon and ends when a user clicks the start => logof button.

– Userinit.exe: Next one to launch is the userinit.exe process which includes various user initializations. This process will also…

View original post 165 more words