Wednesday, February 27, 2013
List users in an active directory group
dsquery group domainroot -name groupname | dsget group -members | dsget user -fn -ln >output.csv
This will dump a list of users in the "groupname" you have entered.
Wednesday, January 16, 2013
Exchange anonymous Relay
Exchange 2007/10 needs a new receice connector created, leave the local network set to default, change remote servers to be just the IP of the device you want to be able to relay. After the connector is created, edit it, remove all checks from authentication boxes, add a check to anonymous on the permission group. Open powershell and run:
Get-ReceiveConnector “Anonymous Relay” | Add-ADPermission –User “NT AUTHORITY\ANONYMOUS LOGON” –ExtendedRights “Ms-Exch-SMTP-Accept-Any-Recipient”
This assumes you named the relay "anonymous relay"
Monday, December 31, 2012
Show exchange user mailbox size from Powershell
Get-MailboxStatistics -Server YOURSERVERNAME | Sort-Object TotalItemSize -Descending | ft DisplayName,@{label=”TotalItemSize(KB)”;expression={$_.TotalItemSize.Value.ToKB()}},ItemCount
You need to change SERVERNAME to your server, you can change KB to MB for totalitemsize.value to show in MB.
Monday, December 10, 2012
Disable Windows 7 Firewall by command line
Domain Profile:
Netsh advfirewall set domainprofile state off
Private Profile:
Netsh advfirewall set privateprofile state off
Public Profile:
Netsh advfirewall set publicprofile state off
Or to disable all:
Netsh advfirewall set all state off
Show profile status:
Netsh advfirewall show allprofiles
Wednesday, July 25, 2012
Windows Firewall tips
You can't stop the service for Windows 7, you can however from a command line stop the firewall portion of the service. From a command line run: netsh advfirewall set allprofiles state off
For Windows XP run:
net stop SharedAccess
and edit the registry key to stop the service from running:
HKLM\System\CurrentControlSet\Services\SharedAccess change start to 4.
Monday, July 16, 2012
Import email PST to exchange 2010
Only works with SP1 and up!!!
Open powershell
New-ManagementRoleAssignment –Role “Mailbox Import Export” –User UserAccount
Place PST file in folder and share out, Exchange Trusted Subsystem must have read/write permissions to the folder.
Next run the import command:
New-MailboxImportRequest –Mailbox Usermailbox–FilePath \\full unc path to share\PST file name
Friday, July 13, 2012
Setup anonymous relay, exchange 2010
Open exchange manager, go to server configuration, hub transport, add new receive connector. Name it relay, in the next window remove the ip settings and add the server ip address, the next window add the devices you want to allow relay from. Once the connector is created, open the connector and choose permission groups and select anonymous. Then you need to run a command from the shell:
Get-ReceiveConnector "Relay" | Add-ADPermission -User "NT AUTHORITY\ANONYMOUS LOGON" -ExtendedRights "Ms-Exch-SMTP-Accept-Any-Recipient"
thats it.
Subscribe to:
Posts (Atom)