Current News:

Windows Server 2008 powershell server manager

Advanced Post/Page options

Recently I had to prep Windows Server 2008 R2 for a new exchange install so I thought I would look into the PowerShell functionality and see what things they are doing. One issue that I have always had with Windows is that they lack a repo style way of installing packages. I like Linux distros way of doing this. In Linux from a shell I know I can just apt-get install {package} or yum install {package}. It is straight forward.

 

So when I found that I could import the server manager module in the power shell I thought this was great. I Just open powershell

> import-module servermanager

> add-windowsfeature web-server

 

Thats it. You can also run get-windowsfeature web-server and see that it has been installed. So to prep the install I ran the following commands:

Add-WindowsFeature Web-Server

Add-WindowsFeature Web-ISAPI-Ext

Add-WindowsFeature Web-Metabase

Add-WindowsFeature Web-Lgcy-Mgmt-Console

Add-WindowsFeature Web-Basic-Auth

Add-WindowsFeature Web-Digest-Auth

Add-WindowsFeature Web-Windows-Auth

Add-WindowsFeature Web-Dyn-Compression

(Note ensure that you have IIS management console and scripts & tools role services installed before installing exchange)

After a few status bars I was ready to go. You can also use wild cards: get-windowsfeature web-*

 

powershell-1.png

 

powershell-2.png

Enable AntiSpam Features In Exchange 2010

Advanced Post/Page options

Microsoft recommends that you run AntiSpam features on an Edge Transport Server. For small organizations it may not be an option to deploy a perimeter network with an Edge Transport Server do to the cost associated with it. For this reason you may want to deploy the AntiSpam features on the Hub Transport server. Below is the process for installing AntiSpam features organization wide, Exchange 2010 also enables you to set AntiSpam settings per mailbox which is really handy. When setting specific settings per mailbox they supersede the organization wide settings.

You must be assigned the Role Management management role to run the Get -ManagementRoleAssignment cmdlet

 

1) Open Exchange Management Shell

2) Navigate to your exchange install directory ie(c:Program filesMicrosoftExchange ServerV14)

3) Navigate to the scripts directory

4) Run the install-AntiSpamAgents.ps1 script

> ./install-AntiSpamAgents.ps1

This will set the default antispam settings

Itentity	        Enable	Priority 
Connection Filter Agent	True	4
Content Filter Agent	True	5
Sender Id Agent		True	6
Sender Filter Agent	True	7
Recipient Filter Agent	True	8
Protocol Analysis Agent	True	9

5) Close the Exchange managment shell and reopen

6) Restart the MSExchangeTransport service by issuing the following command:

restart-service MSExchangeTransport

7) Run the following command to check that your threshold settings have been set

Get-OrganizationConfig | fl *SCL*

8) Run Get-ContentFilterConfig to see your settings

 

Results:

Now if you open the Exchange management console you will have an AntiSpam tab under Organization Configuration -> Hub Transport

Here you will see a list of anti spam features you can right click and view the properties to set custom values for your specific setup.

To setup per mailbox settings you can open the Exchange Server shell and check the settings for the mailbox you are looking into by issuing the following command:

Get-Mailbox {mailbox} | fl *spam*,SCL*

This will show you if any custom settings have previously been set for this mailbox. To set custom settings you can use the command:

Set-Mailbox {mailbox} -SCLDeleteEnabled $true -SCLDeleteThreshold 5  

Enable remote desktop remotely

Advanced Post/Page options

I recently had to enable remote desktop on a domain workstation running winxp but did not have access to the machine. so here is a way to do it.

1) open regedit 

2) click file -> connect network registry

3)  navigate to 

      HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Terminal Server

4) set fDenyTSConnection to a value of 0

you can now connect via rdp. you may need to restart, i did not have to restart.