Saturday, August 15, 2015

Migrate VMDK (Virtual Hard Disk) from one VM to another, maintain permissions and file shares. EASY file migration!

File server migration - the easy way.  Don't migrate files and change login scripts like a chump... :)

1) Get your current file server running on the same host as the new file server.  (If physical, p2v it.  If virtual, move it or v2v it.)
2) Open Regedit on the old file server, navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer
3) Right Click on "Shares", click export.  Copy this file to your new file server.
4) In vmware remove the data disk from the old file server.  (Right click on VM, Edit Settings, click on the data hard disk, click remote.  Make sure you do NOT click remove and delete files from disk, make SURE yous elect "Remove from Virtual Machine".
5) Rename the old server to something else.  (If it's a DC, demote it, then rename it.)
6) Rename the new server to your old server's name.  If it's to be a DC, delete the old computer account in AD and promote it.)
7) In VMware, add the drive.  (Right click on VM, edit settings, add, Hard Disk, use and existing virtual disk, find the VMDK of the drive you are migrating.)
8) In Windows on the new server, make sure you add the drive with the same drive letter the old server had.  (So if it was "D" on the old server, make sure it is "D" on the new server.
9) Import your registry file from step 2.
10) Reboot.

All permissions and shares will be exactly as they were before you started.

Thursday, July 16, 2015

How to see what mailboxes a specific user has Full Access to.

I recently was tasked with finding out which mailboxes a specific user and full access to.  It took me a bit too find this with most providing way too much info.


Get-Mailbox -ResultSize Unlimited | Get-MailboxPermission -User jsmith | Format-Table Identity, AccessRights, Deny

Proper Syntex to change public folder permissions recursive using powershell.

It took me enough google searches to figure this out that I decided to post it here.  The issues seemed to be around the 'space' in the folder name.

Change directories to \Program Files\Exchange Server\Scripts

To add a user to a public folder and all subfolders in powershell use-
\AddUsersToPFRecursive.ps1 -Server "ExchangeServer" -TopPublicFolder "\Sales Folder" -User "JSmith" -Permissions
 PublishingEditor

You can also do this if you want to add them to ALL public folders.
\AddUsersToPFRecursive.ps1 -Server "ExchangeServer" -TopPublicFolder "\" -User "JSmith" -Permissions
 PublishingEditor

To REPLACE their permissions (say they have read access but you want them to have publishing editor), do this-
.\ReplaceUserPermissionOnPFRecursive.ps1 -Server "ExchangeServer" -TopPublicFolder "'\Sales Folder'" -User "JSmith" -Permissions PublishingEditor

Note- the folder is in both quote (") and with a tick (') around it.  It doesn't work with just quotes.

Thursday, June 11, 2015

Removing duplicate lines in Notepad++

Often times I cut / paste between systems and end up with duplicate lines in Notepad++.  Googling finds a lot of solutions that don't work.  Here's all you need to do-

Hit <Ctrl> <H> to get to the replace box (or go to the Search menu and click Replace.)
In "Find What", put \r\n\r\n
In "Replace", put \r\n
Under Search Mode, check "Extended".
Click "Replace All".



Wednesday, March 11, 2015

How to convert a Unix TXT file to Windows in Notepad++ (removing extra line spaces).

Hit <Ctrl> <H>
Select "Extended" under search mode.
In Find What, put "\r\n\r\n"
In Replace With, put "\r\n"
Select "Replace All"

Friday, March 6, 2015

Easily determine what is running at startup, administer services, etc.

Autoruns is a great systinternals utility that allows you to easily administer the startup of any Windows OS.

https://technet.microsoft.com/en-us/sysinternals/bb963902.aspx

Wednesday, March 4, 2015

You can't get into Cisco ASDM and get "Unable to launch the application" from Java. Here are ALL possible ways to resolve this-

You can't get into Cisco ASDM and get "Unable to launch the application" from Java.  Here are ALL possible ways to resolve this-

1) Make sure you are on the latest ASDM (7.x).  You don't need to upgrade the OS to run the latest ASDM.

2)  Go to control panel, java, click on the security tab, click edit site list, and add the URL to your Firewall.  Make sure you include "https://"

3)  If that doesn't resolve it, make sure 3des is enabled in "show version" on the ASA.

4)  If it is, issue these commands-
ssl server-version any
ssl client-version any
ssl encryption rc4-md5 rc4-sha1 aes128-sha1 aes256-sha1 3des-sha1
ssl certificate-authentication fca-timeout 2

5)  If that doesn't work, issue these.  Use your own username and password.
aaa authentication http console LOCAL
username cisco password cisco