Thursday, April 13, 2017

Excel: How to remove empty area and make worksheets nicer for printing

Almost time when using Excel, I need to print its worksheets as result of my work.

But sometimes, I use File >> Print Preview to see what the document will look like if I print it, I often see that the document gets many extra blank pages or the columns broken into new pages. If I save the document as a .pdf file, the problem persists in the .pdf file. It's worse.

However, Excel has Page Layout functions groups to help us make worksheets nicer. Below are 2 functions I often use:
  • Page Layout >> Page Setup >> Print Area >> Set Print Area: select area which you want to print and use this function
  • Page Layout >> Scale to fit >> Width: should be set to 1 page, it will help to avoid broken columns.


There are a lot of functions there which you can try and see until you feel it's good.
Yes, let remember to use Print Preview function to check again before printing any document.
Any comment is welcome.

Bye, nice day!
Hung

Wednesday, March 29, 2017

How to use Azure File Storage as a backup disk on Windows Server

Azure File Storage (AFS) is a file storage service hosting on Azure cloud, it can be used for backup data, files or accessing files like S3 of Amazon.

In this article, I'll show you how to create a storage, map it as a local disk on Windows Server and backup files in a schedule.

1. Create a storage

Login to your Azure portal >> click Storage accounts menu >> click plus +Add button


Below is an example for a standard storage with lowest cost. You can see Azure Storage Pricing for more details.

Once done, open the storage and copy Access keys (can copy key 1 only):

2. Map the storage as local disk

Open cmd tool and run the command like below to map the storage s a local disk on Windows Server:
net use X: \\xxxStorageName.file.core.windows.net\xxxFileFolder /u:xxxStorageName xxxKey

In which:
X: is the letter of the local disk mapped
xxxStorageName: name of the storage you keyed in step 1 (see Create storage account picture)
xxxKey: access key

3. Create a .bat file and put into a Task Scheduler

For example, I want to copy logs file from a folder on another disk to this storage disk. So I create a .bat file naming copylogs.bat with content as below:
@echo off
copy D:\daily\*.log X:\daily
del D:\daily\*.log

After that, I create a Task Scheduler to run this .bat file on 1 AM daily:

It's simple. Hope you can save your data or files on the cloud. It's worth when your server is damaged or something like that.

Any comment is welcome!

Sunday, January 8, 2017

Install Microsoft Security Essentials In Windows Server 2008 to 2012 R2

Microsoft Security Essentials (MSE) is free tool to help guard your Windows computer against viruses and other malware. In previous years, MSE is not in the list of top security guys for Windows, but now Microsoft are investing a lot on security problem and it is running to the top. So it is worth to have MSE on your Windows server to protect your server. MSE also rather doesn't take many resource vs. the other antivirus program, so it doesn't impact much on server performance.

But unfortunately it runs only on Windows desktop. It cannot run on Windows server by default. However, you can make it serves you by the following steps:

1. Go to this link: https://support.microsoft.com/en-us/help/14210/security-essentials-download then choose right version for your server (32 bit or 64 bit) and download mseinstall.exe

2. Use Administrator user, right click on mseinstall.exe then choose Properties menu

3. Select Compatibility tab, then choose Run this program in compatibility mode for Windows 7. Then click OK.

4. Use command prompt, change folder to the folder containing mseinstall.exe then run below command:
mseinstall.exe /disableoslimit

5. Follow next steps and enjoy MSE installed on your Windows server.

You can download a test EICARs file on the link: https://www.eicar.org/86-0-Intended-use.html for checking if MSE is working.

Good bye and good luck!


Subscribe to RSS Feed Follow me on Twitter!