4 handy features in Windows 10

So what happened to Windows 9? I guess 7, ate, 9….. (insert cicada noises). Put that aside, let’s start fresh. Windows 10 preview is here. So what’s so special about Windows 10. Here are 4 handy features that I personally like from Windows 10.

  1. Revamped Start Menu
    Windows 10 Start Menu
    Here you can pin, unpin, resize, move, uninstall within the one menu. In my opinion, this is a key feature for people to adopt to the new OS. They’ve integrated “Metro Apps” with the regular Windows applications very well in this version.
  2. Task View (multiple workspaces)
    Windows 10 Task View
    This is pretty much Ubuntu’s workspaces with a Windows twist. Similar to the principle of tabbing in web browsers, task view allows you to separate different functions for when you use the computer. As an example, your first task/workspace may be used for emails and office applications only, your second task/workspace may have a line of business application running, and your third task/workspace can have your web browsing. Here you can manage your activities in different spaces.
  3. Home folder in Windows Explorer
    Windows 10 Home
    Now you have a home folder that has all your favourite folders as well as frequent folders that you access.
  4. Copy and paste in command prompt
    Windows 10 Copy and Paste
    My personal favourite. Copying and pasting in command prompt. Now you can press ctrl+C and ctrl+V to copy and paste into command prompt. None of this ^v business 🙂

We’ll get into the server/client bits and pieces in another post that is still to come 🙂

Batch script to determine 32 or 64 bit Windows Operating Systems and perform an action

I think that’s the longest title I’ve ever made! Anyway, if you’re like me and need to work on different Windows Operating Systems and would like to distinguish between architecture types when executing batch scripts, then you’ve come to the right place.

Check out the below script and use it to make your life easier:

@echo off
::Written by Samontech

SET Version=Unknown

wmic os get osarchitecture | FINDSTR /IL “32” > NUL
IF %ERRORLEVEL% EQU 0 SET Version=”32″

wmic os get osarchitecture | FINDSTR /IL “64” > NUL
IF %ERRORLEVEL% EQU 0 SET Version=”64″

ECHO The OS architecture of Windows found is %VERSION% bit

IF %VERSION% == “32” GOTO OLD
IF %VERSION% == “64” GOTO NEW
::If no versions are found go to UNKNOWN
GOTO UNKNOWN

:OLD
ECHO Execute script for 32 bit OS
***Insert awesome script work here!
GOTO FINISH

:NEW
ECHO Execute script for 64 bit OS
***Insert awesome script work here!
GOTO FINISH

:FINISH
ECHO Script executed successfully
GOTO END

:UNKNOWN
ECHO OS Architecture Unknown

:END

It’s very similar to my batch script which deletes temporary files on all Windows Operating systems, but, use your imagination and put it to use e.g. upgrading Adobe Reader, Adding Registry keys, the list goes on!

Force all VPN traffic out the remote gateway

Have you ever needed to connect to a remote site and tried a whatsmyip, and realised that “Hey my IP is still the same. All the internetz sites will know where I’m browsing from”. A bit of an extreme scenario but by default Windows VPN does not force ALL your VPN traffic out the remote gateway. Instead it will pass traffic not required in the remote network through your own gateway, for example, web traffic. So how do you force all VPN traffic out the remote gateway? Here’s how you can do it on a Windows 7/8 machine (very similar to XP so don’t stress)

  1. Open up Network and Sharing Center.
  2. Click on Change adapter settings.
  3. Locate the VPN adapter that you’ve configured previously. Right click and select Properties.
  4. Here comes the good stuff… When the properties Window appears, go to the “Networking” tab.
    VPN_Networking
  5. Select Internet Protocol Version 4 (TCP/IPv4) and click Properties
  6. Click on the Advanced button
    VPN_Advanced
  7. In the IP Settings Tab, select the check box next to Use default gateway on remote network.
    VPN_Gateway
  8. If you are using an IPv6 IP scheme then make sure you make the changes for the IPv6 protocol from Step 5.
  9. Click OK, OK and OK!
  10. Try a whatsmyip again and voila your IP will now be that of the remote network. Note: you may need to disconnect the VPN and reconnect for the changes to take effect

Great work 🙂

CA ARCserve 2012 R2 Support

So Citrix XenApp 6.5 is now EOS and we’re forced to go to XenDesktop going forward? What’s the big deal right? Well I guess that means that Server 2012 and Server 2012 R2 will not be supported to deliver XenApp and future customers may need to pay for a full fledged VDI/Session Based remote solution (even if they don’t require it) and of course pay the premium price. So what may be an alternative? Well with Server 2012’s improved RDP sessions (PDF scrolling, internet browsing etc), this may be a viable option for smaller businesses that do not require a full VDI environment.

But questions you always need to ask when moving to a new OS, what other applications will you need to run on this OS and will they be supported. Third party AV, monitoring tools, firewalls, backup, line of business applications …. and the list goes on! Which leads me to the above title (since we conveniently stumbled upon this today).

Here’s a quick run down:

  • CA ARCserve Backup r16.5 WITH update 3 now supports Server 2012 R2 as well as Windows 8.1
  • D2D is currently not supported (as per ARCserve’s compatibility matrix)

For the friendly IT guys out there who haven’t had the chance to test whether D2D works on 2012 R2, I have already done this for you. Here are my findings:

  • D2D installation completes without errors or issues
  • Full D2D backups work without errors or issues
  • Incremental D2D backups work without errors or issues
  • Granular file restore work without errors or issues
  • Bare metal restores work without errors or issues

So I guess in a nutshell, it works! Woohoo! Keep in mind though that this is still not “officially” supported.

Enabling Active Directory Recycling Bin – Windows Server 2012

Ever have to do an authoritative restore? Tombstone Reanimation? Feeling chills down your spine?  Me too… Server 2012 says no to this! And I agree wholeheartedly. So how do we do it? Pre-requisites:

  •  The domain functional level of the forest needs to be at least Windows Server 2008 R2

How to set it up:

Powershell

  • Type the following command: Enable-ADOptionalFeature “Recycle Bin Feature’ -scope ForestOrConfigurationSet -target –domainname -server domaincontroller

GUI

  • Open Active Directory Administrative Center from the Tools menu in Server Manager
  • Right click your domain in the navigation tree and select “Enable Recycle Bin”

 

Notes:

  • Enabling the AD recycling bin is irreversible so once you do it you can’t undo it.
  • To confirm the recycling bin has been enabled, a Deleted Objects container will appear at the root of the Domain Controller.

Easy as pie 🙂

Installing Applications on a Terminal Server

Because of the Sophos issues that many of my clients experienced, many endpoints required a re-installation, particularly on Terminal Servers. This is a quick and easy reminder of best practices for installing applications on a terminal server.

  1. Log on to the server as a domain administrator
  2. Open up command prompt and type the following command
    change user /install
  3. Your session will now be ready to install applications that will work across all user profiles.
  4. Install the application required e.g. Microsoft Office
  5. Once you have finished the install open up command prompt again and type in
    change user /execute


Cleanup Windows & Java Temporary Files using a Batch Script

Recently, there was a breakout of malware tricking people to install a fake “anti-virus” software, which in turn infected their machines. Mind you, the primary reason machines get infected in the first place is because people are browsing dodgy websites so BE CAREFUL or get PROTECTED!

The infected files are usually downloaded to a temporary internet files folder or java temporary folder and are executed/installed from there. It’s always good practice to clear out these temporary files to prevent malicious activity as well as save you some disk space. This batch script can be used as a scheduled task or deployed through your favourite monitoring tool to “cleanup” these temporary files.

This script should work on all Windows platforms so happy cleaning 🙂

Delete All Temporary Files

Note: copy and paste the below code into notepad and save as the text file as a .bat file. Change the “Save as type” to All Files and make sure you add a .bat to the end of the name e.g. Cleanup.batThere is a tutorial post located here.

@echo off
::Written by Samontech
::Determine which version of Windows is installed
::Set Variable Version to unknown

SET Version=Unknown

VER | FINDSTR /IL “5.0” > NUL
IF %ERRORLEVEL% EQU 0 SET Version=”Windows 2000″

VER | FINDSTR /IL “5.1.” > NUL
IF %ERRORLEVEL% EQU 0 SET Version=”Windows XP”

VER | FINDSTR /IL “5.2.” > NUL
IF %ERRORLEVEL% EQU 0 SET Version=”Windows 2003″

VER | FINDSTR /IL “6.0.” > NUL
IF %ERRORLEVEL% EQU 0 SET Version=”Windows Vista”

VER | FINDSTR /IL “6.1.” > NUL
IF %ERRORLEVEL% EQU 0 SET Version=”Windows 7″

VER | FINDSTR /IL “6.2.” > NUL
IF %ERRORLEVEL% EQU 0 SET Version=”Windows 8″

VER | FINDSTR /IL “6.3.” > NUL
IF %ERRORLEVEL% EQU 0 SET Version=”Windows 8.1″

ECHO The version of Windows found is %VERSION%

IF %VERSION% == “Windows XP” GOTO XP
IF %VERSION% == “Windows 2000” GOTO XP
IF %VERSION% == “Windows 2003” GOTO XP
IF %VERSION% == “Windows Vista” GOTO WIN7
IF %VERSION% == “Windows 7” GOTO WIN7
IF %VERSION% == “Windows 8” GOTO WIN7
IF %VERSION% == “Windows 8.1” GOTO WIN7

::If no versions are found go to UNKNOWN
GOTO UNKNOWN

:WIN7
ECHO WIN7 script to execute
cd /D C:\users
ECHO Clean Temp Folder
for /D %%a in (*.*) do DEL /F /S /Q “%%a\AppData\Local\Temp\*.*”
for /D %%a in (*.*) do FOR /D %%b IN (“%%a\AppData\Local\Temp\*.*”) DO RMDIR /S /Q “%%b”
ECHO Clean IE Cache
for /D %%a in (*.*) do DEL /F /S /Q “%%a\AppData\Local\Microsoft\Windows\Temporary Internet Files\*.*”
for /D %%a in (*.*) do FOR /D %%b IN (“%%a\AppData\Local\Microsoft\Windows\Temporary Internet Files\*.*”) DO RMDIR /S /Q “%%b”
ECHO Clean JAVA Cache
for /D %%a in (*.*) do DEL /F /S /Q “%%a\AppData\LocalLow\Sun\Java\Deployment\cache\*.*”
for /D %%a in (*.*) do FOR /D %%b IN (“%%a\AppData\LocalLow\Sun\Java\Deployment\cache\*.*”) DO RMDIR /S /Q “%%b”

GOTO FINISH

:XP
ECHO XP script to execute
cd /D “C:\Documents and Settings”
ECHO Clean Temp Folder
for /D %%a in (*.*) do DEL /F /S /Q “%%a\Local Settings\Temp\*.*”
for /D %%a in (*.*) do FOR /D %%b IN (“%%a\Local Settings\Temp\*.*”) DO RMDIR /S /Q “%%b”
ECHO Clean IE Cache
for /D %%a in (*.*) do DEL /F /S /Q “%%a\Local Settings\Temporary Internet Files\*.*”
for /D %%a in (*.*) do FOR /D %%b IN (“%%a\Local Settings\Temporary Internet Files\*.*”) DO RMDIR /S /Q “%%b”
ECHO Clean JAVA Cache
for /D %%a in (*.*) do DEL /F /S /Q “%%a\Application Data\Sun\Java\Deployment\cache\*.*”
for /D %%a in (*.*) do FOR /D %%b IN (“%%a\Application Data\Sun\Java\Deployment\cache\*.*”) DO RMDIR /S /Q “%%b”

GOTO FINISH

:FINISH
ECHO Temporary files successfully deleted
GOTO END

:UNKNOWN
ECHO Operating System Unknown

:END

 

Edit: Added Windows 8 paramater 🙂 special thanks to wampbox for that!