Wednesday, December 16, 2015

How to check attachment limits in Exchange

get-transportconfig | ft maxsendsize, maxreceivesize 
get-receiveconnector | ft name, maxmessagesize 
get-sendconnector | ft name, maxmessagesize 
get-mailbox Administrator |ft Name, Maxsendsize, maxreceivesize

Monday, December 14, 2015

How to add a user to a Public Folder including all Subfolders in Exchange 2010 / 2013

Get-PublicFolder –Identity “\Public Folder” –Recurse | Add-PublicFolderClientPermission –User UserName –AccessRights PublishingAuthor


To remove a user from all public folders-
Remove-PublicFolderClientPermission -Identity "\" -User UserName

Thursday, September 10, 2015

Cisco Anyconnect does not work after upgrading to 9.4 or 9.5.

The issue is that 9.4 and above which requires configuring custom ciphers in order to user third party CA certs for Anyconnect.  

ssl cipher tlsv1.2 custom "AES256-SHA:AES128-SHA:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:DES-CBC3-SHA:DES-CBC-SHA:RC4-SHA:RC4-MD5"


Here’s the 9.4 release notes that detail the issue - http://www.cisco.com/c/en/us/td/docs/security/asa/asa94/release/notes/asarn94.html

Friday, September 4, 2015

How to get a list of the last time users changed passwords and if they are set for their passwords to never expire.

Open PowerShell, type-

 get-aduser -filter * -properties passwordlastset, passwordneverexpires |ft Name, passwordlastset, Passwordneverexpires

To Export to CSV-
Get-ADUser -filter * -properties passwordlastset, passwordneverexpires | sort-object name | select-object Name, passwordlastset, passwordneverexpires | Export-csv -path c:tempuser-password-info-20131119.csv


For enabled only-
get-aduser -filter 'enabled -eq $true'  -properties passwordlastset, passwordneverexpires |ft Name, passwordlastset, Passwordneverexpires

To see an accounts creation date-

Get-ADUser <UserName> -Properties whenCreated | Format-List Name,whenCreated

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.