Monday, 28 October 2013
Extending partition in WIndows XP (and possibly 2003)
Friday, 27 September 2013
RDP remote control fails when UAC is enabled
shadow
Wednesday, 21 August 2013
Windows 7 VM sleep
Sunday, 18 August 2013
Importing GPO from ISO/CD-ROM
Sunday, 5 May 2013
Windows DNS client cache timeout
Tuesday, 19 March 2013
IIS 7 IP restrictions with PowerShell
PowerShell can be used to configure many options in IIS, this is useful for repetitive tasks such as IP restrictions on websites. First import the IIS module into powershell, execution policy must at least be set to remoteSigned.
Import-Module WebAdministration
Then use Add-WebConfiguration to add individual IP's or a subnet at a website or a directory/virtual directory under it:
Add-WebConfiguration /system.webServer/security/ipSecurity -location 'test1' -value @{ipAddress='192.168.1.2';allowed='true'}
Add-WebConfiguration /system.webServer/security/ipSecurity -location 'test1/test2' -value @{ipAddress='192.168.1.2';allowed='true'}
Add-WebConfiguration /system.webServer/security/ipSecurity -location 'test1/test2' -value @{ipAddress='192.168.3.0'; subnetMask='255.255.255.0';allowed='true'}
Set-WebConfigurationProperty can be used to allow or deny unlisted IP addresses at a site or a directory/virtual directory under it:
Set-WebConfigurationProperty -Filter /system.webserver/security/ipsecurity -Name allowUnlisted -Value $false -Location 'test1/test2'
Set-WebConfigurationProperty -Filter /system.webserver/security/ipsecurity -Name allowUnlisted -Value $true -Location 'test1'
Monday, 18 February 2013
Scheduled Powershell Tasks

Note to self, the sender address for a windows scheduled task on an exchange server using the PowerShell command Send-MailMessage seems to need to match the email address of the account running the task.
Update: security policy may stop you from saving the password for the account running the task. Check this policy either in local or group policy.
[disable] to allow the password to be saved.
Friday, 8 February 2013
RDP with NLA
I recently enabled network level authentication for RDP on some servers to close a security audit point and found a problem with accounts that have computers configured under the userWorkstations attribute in AD. This is set on the account tab using the log on to button. If the account used for RDP to a remote machine isn't allowed to logon to the local machine then RDP will fail with an error "the local security authority cannot be contacted." It didn't strike me as the most obvious thing as I assumed all authentication would be with the remote machine for NLA but it appears the use must authenticate locally first to create the RDP session.