martes, 31 de diciembre de 2013

Exchange 2013 | Email Forwarding

Email Forwarding


Sometimes we need to forward an email account to another account.
For example when a user is OOO, or when a user leaves the company and sombady else needs to receive the emails that sent to the first one.

So, in order to setup that we have 2 choices.

  1. Using Power Shell
  2. Using EAC (Exchange Admin Center)

1- Using Power Shell

This example forwards all email sent to the mailbox of Ken Sanchez to pilarp@contoso.com.
Set-Mailbox -Identity "Ken Sanchez" -ForwardingAddress "pilarp@contoso.com"
This example delivers email to the mailbox of Dan Park and at the same time forwards all mail sent to Dan Park to danpark.parents@fineartschool.net.
Set-Mailbox -Identity "Dan Park" -ForwardingAddress "danpark.parents@fineartschool.net" -DeliverToMailboxAndForward $true
When a mailbox is created, the value of the DeliverToMailboxAndForward parameter is set to $false by default. When you use the EAC to configure mail forwarding, this value isn't changed. This means that email sent to the user's mailbox is sent to the forwarding address and not copied to the user's mailbox. If you want messages to be delivered to both the mailbox and the forwarding address, you have to set the DeliverToMailboxAndForward parameter to $true.


2- Using EAC (Exchange Admin Center)

  1. In the EAC, navigate to Recipients > Mailboxes.
  2. In the list of user mailboxes, click the mailbox that you want to configure mail forwarding for, and then click Edit Edit Icon.
  3. On the mailbox properties page, click Mailbox Features.
  4. Under Delivery Options, click View details to view or change the setting to forward email messages sent to the user to another recipient.
  5. Select the Enable forwarding check box and then click Browse.
  6. On the Select Mail User and Mailbox page, select a recipient to whom you want to forward all email messages that are sent to this mailbox.
  7. Click OK, and then click Save to save your changes.


viernes, 29 de noviembre de 2013

MCSA: Windows Server 2012 (Microsoft Certified Solutions Associate)

MSSA: Microsoft Certified Solution Associate or System Administrator? It's a mess!

Before to start I would like to explain the  difference between Microsoft Certified Solutions Associate (MCSA) certifications.

MCSA (Microsoft Certified Solutions Associate) is a certification program intended for people who seek entry-level jobs in an IT (information technology) environment. MCSA is a prerequisite for more advanced Microsoft certifications. 

The MCSA credential supplants the now defunct Microsoft Certified Systems Administrator certification. Students could choose between difference technologies, for instance: 
  • Windows Server 2012
  • SQL Server 2012
  • Windows 8
As they advance in the MCP program, professionals can gain any or all of the following certifications:
  • Microsoft Certified Systems Engineer (MCSE)
  • Microsoft Certified Solutions Developer (MCSD)
  • Microsoft Certified Product Specialist (MCPS)
  • Microsoft Certified Trainer (MCT)
To prepare for the MCP exams, students can take courses at a certified training company location, in certified courses in a high school or college, or through self-study at Microsoft's self-study Web site or through certified training materials. Students who do not feel ready for MCSA can obtain the more basic MTA (Microsoft Technology Associate) certification first.
To clarify this mess, you could check the Microsoft IT Certification Roadmap and find your path :)



Now, How can I get my Windows Server 2012 MSCA?

Well, in order to get the Windows Server 2012 MSCA the students will need to pass three Certification Exams.
There are:

  • MS-20410: Installing and Configuring Windows Server 2012 (More info)
  • MS-20411: Administering Windows Server 2012 (More info)
  • MS-20412: Configured Advanced Windows Server 2012 (More info)
It Sound difficult, Right? 

Well, if you have a little of experience administering Windows Server 2008/2012 the two first certification won't be a big deal, maybe the student will need to study a little more for the last one, Configured Advanced Windows Server 2012, because there you will see a lot of new and strategics stuff to use with Windows Server 2012.

A bit of help to study

To prepare for the exam, the student could use a tool that emulate the exam that you need to pass. With same questions and the same methodology of Microsoft exams ... multiple choice.

This tool is called: Visual CertExam Suite

In the other hand we will need the Exams ... in order to get them you will need to download it from http://www.examcollection.com/ 

So, lets go to work:
  1. Download and install the Visual CertExam Suite from here.
  2. Now we need to download the Exams from ExamCollection
    1. MS-20410
    2. MS-20411
    3. MS-20412
NOTE: Here you will find the 3 best exams to do. Please download them and enjoy it. Click Here
So, we haven't any excuse now. Lets go to study and to be an MCSA :)




viernes, 26 de abril de 2013

MySQLDUMP Import - Export a data base



phpMyAdmin can be used to export or backup MySQL databases easily. However, if the database size is very big, it probably won’t be a good idea. phpMyAdmin allows users to save database dump as file or display on screen, which involves exporting SQL statements from the server, and transmitting the data across slower network connection or Internet to user’s computer. This process slow the exporting process, increase database locking time and thus MySQL unavailability, slow the server and may simply crash the Apache HTTPD server if too many incoming web connections hogging the system’s resources.
The better way to backup and export MySQL database is by doing the task locally on the server, so that the tables’ data can be instantly dumped on the local disk without delay. Thus export speed will be faster and reduce the time MySQL database or table is locked for accessing. This tutorial is the guide on how to backup (export) and restore (import) MySQL database(s) on the database server itself by using the mysqldump and mysql utilities. There are basically two methods to backup MySQL, one is by copying all table files (*.frm, *.MYD, and *.MYI files) or by using mysqlhotcopyutility, but it only works for MyISAM tables. Below tutorial will concentrate on mysqldump which works for both MyISAM and InnoDB tables.
How to Export or Backup or Dump A MySQL Database
To export a MySQL database into a dump file, simply type the following command syntax in the shell. You can use Telnet or SSH to remotely login to the machine if you don’t have access to the physical box.
mysqldump -u username -ppassword database_name > dump.sql
Replace username with a valid MySQL user ID, password with the valid password for the user (IMPORTANT: no space after -p and the password, else mysqldump will prompt you for password yet will treat the password as database name, so the backup will fail) and database_name with the actual name of the database you want to export. Finally, you can put whatever name you like for the output SQL dump file, here been dump.sql.
The while data, tables, structures and database of database_name will be backed up into a SQL text file named dump.sql with the above command.
How to Export A MySQL Database Structures Only
If you no longer need the data inside the database’s tables (unlikely), simply add –no-data switch to export only the tables’ structures. For example, the syntax is:
mysqldump -u username -ppassword –no-data database_name > dump.sql
How to Backup Only Data of a MySQL Database
If you only want the data to be backed up, use –no-create-info option. With this setting, the dump will not re-create the database, tables, fields, and other structures when importing. Use this only if you pretty sure that you have a duplicate databases with same structure, where you only need to refresh the data.
mysqldump -u username -ppassword –no-create-info database_name > dump.sql
How to Dump Several MySQL Databases into Text File
–databases option allows you to specify more than 1 database. Example syntax:
mysqldump -u username -ppassword –databases db_name1 [db_name2 ...] > dump.sql
How to Dump All Databases in MySQL Server
To dump all databases, use the –all-databases option, and no databases’ name need to be specified anymore.
mysqldump -u username -ppassword –all-databases > dump.sql
How to Online Backup InnoDB Tables
Backup the database inevitable cause MySQL server unavailable to applications because when exporting, all tables acquired a global read lock using FLUSH TABLES WITH READ LOCK at the beginning of the dump until finish. So although READ statements can proceed, all INSERT, UPDATE and DELETE statements will have to queue due to locked tables, as if MySQL is down or stalled. If you’re using InnoDB, –single-transaction is the way to minimize this locking time duration to almost non-existent as if performing an online backup. It works by reading the binary log coordinates as soon as the lock has been acquired, and lock is then immediately released.
Syntax:
mysqldump -u username -ppassword –all-databases –single-transaction > dump.sql
How to Restore and Import MySQL Database
You can restore from phpMyAdmin, using Import tab. For faster way, upload the dump file to the MySQL server, and use the following command to import the databases back into the MySQL server.
mysql -u username -ppassword database_name < dump.sql
The import and export of MySQL database not only is important to recover the data when disaster strikes, but also provides an easy way to migrate or move to another server, such as when switching web hosting providers. However, do note that one common problem – character set encoding. Newer release of mysqldump uses UTF8 as its default charset if nothing is specified, while older versions (older than 4.1 typically) use Latin1 as default characterset. If you database charset is Latin1 and dump in UTF8 collation, the data may ends up become simply rubbish, garbled, or unreadable (frequently happen with WordPress blog). If this case, use –default-character-set=charset_nameoption to specify the character set or convert the database to UTF8.

How do I import data stored in a .sql file (created by mysqldump command) under UNIX or Linux operating systems?

The syntax is as follows to import the data created by mysqldump command:
 
mysql -u {DB-USER-NAME} -p {DB-NAME} < {db.file.sql}
mysql -u {DB-USER-NAME} -h {MySQL-SERVER-HOST-NAME} -p {DB-NAME} < {db.file.sql}
 
In this example import a file called sales.sql for salesdb1 user and sales db, enter:
$ mysql -u sales -p salesdb1 < sales.sql
If database salesdb1 does not exists, first create it and than import it as follows:
$ mysql -u root -p -e 'create database salesdb1'
$ mysql -u sales -p salesdb1 < sales.sql



Mount a pendrive !!

Assume the pendrive is /dev/sda1 and you want to mount it at /media/pendrive, then you should be able to mount it as a priveleged user with
Code:
mount /dev/sda1 /media/pendrive
There is a wrapper called pmount that, IIRC, the Debian folks created to allow non-priveleged users to mount things such as pendrives. This might be something you want to install for mom. If you use pmount, the command would be
Code:
pmount /dev/sda1 /media/pendrive
Additionally, you might want to create and alias so mom doesn't need to type so much
Code:
alias pen='mount /dev/sda1 /media/pendrive'
Then mom just executes the command pen to mount the pendrive.

SCP copy files from Mac to Linux


scp command line to securely copy files over ssh, between Linux, Mac or Windows



Written by Guillermo Garron .
Date: 2012-04-25 16:59:35 -0400

SCP Introduction

scp stands for secure cp (copy), which means you can copy files across ssh connection. That connection will be securely encrypted, it is a very secure way to copy files between computers
You can use scp to copy files from or to a remote server. You can also copy files from one remote server to another remote server, without passing traffic through your PC.
You can use scp on Linux, Mac and Windows (using WinSCP).

SCP Usage

scp [[user@]from-host:]source-file [[user@]to-host:][destination-file]
from-host
Is the name or IP of the host where the source file is, this can be omitted if the from-host is the host where you are actually issuing the command
user
Is the user which have the right to access the file and directory, that is supposed to be copied in the case of the from-host, and the user who has the rights to write in the to-host
source-file
Is the file or files that are going to be copied to the destination host, it can be a directory but in that case you need to specify the -r option to copy the contents of the directory
destination-file
Is the name that the copied file is going to take in the to-host, if none is given all copied files are going to keep its names

SCP Options

-p
Preserves the modification and access times, as well as the permissions of the source-file in the destination-file
-q
Do not display the progress bar
-r
Recursive, so it copies the contents of the source-file (directory in this case) recursively
-v
Displays debugging messages

SCP Examples

scp *.txt user@remote.server.com:/home/user/
That is going to copy all files with .txt extension to the folder /home/user in the remote.server.com host
scp -r miguel@10.1.2.2:/home/miguel/ miguel@10.1.2.3:/home/miguel/
That is going to recursively copy all files from Miguel’s home directory on 10.1.2.2 to his home folder in 10.1.2.3 host.
As have been told before, scp copies files between computers using ssh, and there are three types of usage:
Copy files from a local computer to a remote computer
scp somefile username@server:/home/username/
Copy files from a remote server to your local computer
scp username@server:/home/username/file_name /home/local-username/file-name
Copy files from a remote server to another remote computer
This is really interesting and very useful, as the files copied from one server to the other, are not going to pass through your computer. The traffic is going to pass from one server to the other directly.
scp user_name1@server1:/home/user_name1/file_name user_name2@server2:/home/user_name2/

SCP Tricks

Bandwidth limit
You may limit the bandwidth used by scp command
scp -l limit username@server:/home/uername/* .
Where limit is specified in Kbit/s.
Increase scp speed
scp uses AES-128 to encrypt data, this is very secure, but also a litle bit slow. If you need more speed and still have security, you can use Blowfish or RC4.
To increase scp speed change chipher from the default AES-128 to Blowfish
scp -c blowfish user@server:/home/user/file .
Or use RC4 which seems to be the fastest
scp -c arcfour user@server:/home/user/file .
This last one is not very secure, and it may not be used if security is really an issue for you. You can also increase security while decreasing speed. Everything has its cost.
scp -c 3des user@server:/home/user/file .
That is maybe the slowest, but also maybe the more secure one (I may be wrong, I’m not an expert in encryption).

Final notes

It is very important to consider that scp encrypts the data before sending it over the internet. So, if you can use it over ftp or rcp, you better use it.
Finally, as I said before, you can use WinSCP to copy to and from Windows to Linux or Mac. For the Mac OS Xscp is supported by default, just like with Linux.

Source: http://www.garron.me/linux/scp-linux-mac-command-windows-copy-files-over-ssh.html

jueves, 25 de abril de 2013

Open as Administrator in Ubuntu


Open As Administrator in Ubuntu 12.04 & 12.10


This tutorial is going to show you how to add ‘Open As Administrator’ in Nautilus’ context menu in Ubuntu 12.04 & 12.10. This will allow you to edit or modify files or folders with root or administrator permission.
For Ubuntu 10.10 and 10.04, you can just install nautilus-gksu package from Ubuntu Software Center, then you get the ‘Open As Administrator’ option at next login. For Ubuntu 11.04 and 11.10, install nautilus-gksu and copy and paste libnautilus-gksu.so file from /usr/lib/nautilus/extensions-2.0/ to /usr/lib/nautilus/extensions-3.0/
Method 1: (not working for Ubuntu 12.10)
nautilus-gksu package has been dropped in Ubuntu 12.04 and 12.10 since “gksu” 2.0.2-6ubuntu1 release, so you can not install it easily. Here I’m going to use nautilus script to add Open As Administrator functionality.
First download the libnautilus-gksu.so file:
Click to Download libnautilus-gksu.so
Then, run gksudo nautilus in terminal (Ctrl+Alt+T) to open file browser with root privilege, copy and paste this file to/usr/lib/nautilus/extensions-3.0/. Or do it with this command:
sudo cp ~/Downloads/libnautilus-gksu.so /usr/lib/nautilus/extensions-3.0/
Log out and back in, or run this command to take effect:
nautilus -q
Enjoy!

viernes, 22 de febrero de 2013

Remotely-Restart a Windows Machine Through Command-Line


The DOS command line built into every windows machine can be used to perform a lot of useful tasks including shutting down or restarting another device remotely. To remotely restart a Windows machine through command line, follow these instructions.

EditSteps

Enable Remote Restart on the Desired Windows Machine

  1. 1
    Log into the machine you’d like to remote-restart as an Administrator.

    Soluciones SharePoint

     Desarrollos a medida especificos para Intranet, Extranet, Internet
    www.huddle.com.ar
  2. 2
    Go to Start > Run.




    • Alternatively, type services.msc into the Search function and skip to Step 3.




  3. 3
    Type services.msc and hit Open.




  4. 4
    Scroll down to Remote Registry, right-click, and select Properties from the drop-down list.




  5. 5
    To the right of Startup Type, select Automatic from the drop-down list, then hit OK.




  6. 6
    Configure your firewall to make Windows Management Instrumentation (WMI) an allowed program. How you do this will depend on your firewall program.
    • To do this on Windows Firewall, go to Windows Firewall, click Change Settings, go to the Exceptions tab, and check the box next to Windows Management Instrumentation (WMI).




  7. 7
    Make a note of the device name, as you will need it later. To do this on a Windows computer:
    • Right-click on My Compter and select Properties.




    • Scroll down to Computer name, domain, and workgroup settings. You will find the computer name listed here.




Remotely Restart via Command Prompt

  1. 1
    Log into a remote Windows computer as an Administrator.
  2. 2
    Go to Start > Run.







    • Alternatively, type cmd.exe into the Search function and skip to Step 3.




  3. 3
    Type cmd.exe and hit Open.




  4. 4
    Type shutdown /i and hit Enter.




  5. 5
    Click Add, type in the name of the remote device, and hit OK.




  6. 6
    Apply the desired settings and hit OK. For example, you can choose to shut down or restart, warn the user on the remote machine, display the warning for a set length of time, etc.

Remotely Restart on Windows XP Professional

  1. 1
    Log into a remote Windows computer as an Administrator.
  2. 2
    Go to Start > Control Panel.
  3. 3
    Navigate to Performance and Maintenance > Administrative Tools > Computer Management.
  4. 4
    Right-click Computer Management (Local) and select Connect to another computer.
  5. 5
    Click Another computer, type the name of the machine you want to restart, and click OK. You can also click Browse to find this name.
  6. 6
    Right-click Computer Management (Name You Supplied) and select Properties.
  7. 7
    Under the Advanced tab, click Startup and Recovery.
  8. 8
    Click Shutdown, find Actions, and select Restart.
  9. 9
    Under Force Apps Closed, adjust to the desired settings and hit OK.