How to move the SQL tempDB database files

Open SSMS (If you don’t know what is SSMS, you shouldn’t be doing this…) Paste and execute this query, modifying it to your needs

Restart the MS SQLSERVER Services. A new tempDB data and log files will be created in the newly specified location. You can deleted the original ones. Do not forget, you…

Get a list of assigned IPs and Host name from System Center Virtual Machine Manager IP Pool

Run from Virtual Machine Manager PowerShell Console:  

Duplicate a table in MySQL

  Very simple! Log on to your MySQL instance, and select the DB you table is in;

Create the new table with the same structure as your source;

Then copy all the content from your original table into your new one;

You’re all done ! Easy right !?

Set file permissions for WordPress on CentOS 6.5 and Apache

SSH to the web server cd into your wordpress forlder;

Make Apache the owner

Change all sub-folder’s permissions to rwxr-xr-x (0755);

Change all files’s permissions to rw-r–r– (0644);

Exchange Mailbox Export / Import Requests

Before you create any Export or Import; review/modify the max values for Transport, Receive and Send

To create an export request:

** You need to grant read/write permission to the group “Exchange Trusted Subsystem” to the network share where you want to export or import mailboxes. To get the Stats on the Export…

PowerShell – Remove all files from a folder

This script will delte everyting in the “Script” folder, sub-folder, and the “-recurse” option will prevent the prompting of confirmation. The “-exclude” option alllows you to exclude files and folders.

Alternative;

More on the Remove-Item Powershell cmdlet can be found here: Powershell 1.0 http://technet.microsoft.com/en-us/library/ee176938.aspx Powershell 4.0 http://technet.microsoft.com/en-us/library/hh849765.aspx

How to fix orphaned SQL Server users

Make sure to run all listed commands from the database you are fixing, not from Master. List the orphaned users in the database

To assign/repair with an existing login:

To create a new login and password for this user, use this instead:

Remove Hidden Network Adapters

1- Click Start, click Run, type cmd.exe, and then press ENTER. 2- Enter this command and then press ENTER:

3- Open Device Manager;

Click View, and then click Show Hidden Devices. Expand the Network Adapters tree. Right-click the dimmed network adapter, and then click Uninstall.

Install VMware Tools on any Debian Base OS

In VMware, select your guest, and click “Install/Upgrade VMware Tools” Then go back in your VM, and issue all the following commands from terminal.

Sometimes, you have to run the “mount” twice…. Cdrom might not have been ready the first time

Install the headers, required to build:

Proceed with the rest of…