To allow a Windows Server to have more than one RDP session per account, access HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server and change the value of fSingleSessionPerUser from 1 to 0. This change does not allow more than the default number of administrative remote sessions.
Sunday, October 6, 2013
Saturday, October 5, 2013
PowerShell command to prevent accidental deletion
To enable the feature to prevent accidental deletion for all user objects within Active Directory, use the following PowerShell command.
Get-ADObject -filter {(ObjectClass -eq "user")} | Set-ADObject -ProtectedFromAccidentalDeletion:$true
The command above should enable the parameter for all user and computer accounts within Active Directory.
Sunday, June 2, 2013
Active Directory ACL Scanner script
The Active Directory ACL Scanner script is a PowerShell-based script that will create reports of access control lists within Active Directory.
Sunday, March 3, 2013
Enable/Disable Last Access Timestamp in Windows
The Last Access Time with a file or folder was disabled by default starting with Windows Vista, as it can add overhead to disk I/O. To enable the Last Access Time feature, launch an administrative command prompt and use the following command:
fsutil behavior set disablelastaccess 0
To disable the feature again in the future, use the same command but with a 1.
fsutil behavior set disablelastaccess 1
Saturday, March 2, 2013
How to use PowerShell to export all Group Policy objects
To export all Group Policy objects with Windows Server 2008 R2, launch a PowerShell session on a domain controller. Use the following commands:
Import-Module GroupPolicy
Backup-GPO –All –Path C:\folderpath
Exporting information from a Windows 2008 R2 DHCP server
Information such as existing scopes can be exported from a Windows 2008 R2 DHCP server by using the command:
netsh dhcp server export c:\filename.txt all
The data can be imported back in using the netsh dhcp server import command. The problem with the output of the command above is the information cannot be easily read. The command below will export the DHCP data in a readable format, but cannot be used to import the information back in.
netsh dhcp server dump all > c:\filename.txt
Saturday, February 2, 2013
How to use PowerShell to create a Group Policy report with Windows Server 2008 R2
To create a report of all existing Group Policy entries, launch the Active Directory Module for Windows PowerShell on a domain controller. Enter the following commands:
Import-Module GroupPolicy
Get-GPOReport –All –ReportType HTML –Path C:\gpreport.html
Wednesday, November 2, 2011
XML filtering within the Windows Event Viewer
Starting in the Windows Vista/Server 2008 time frame, an option was made available to modify or create a XML query to generate Custom Views within the Event Viewer. To create a Custom View, access the Event Viewer application. Right-click on the Custom Views subfolder and select the Create Custom View menu option.
Click on the XML tab and then on the Edit query manually checkbox. Click on the Yes button within the warning dialog box.
Enter text for the XML query. Below is some sample text to search the Security logs for the user account test:
<QueryList>
<Query Id="0" >
<Select Path="Security">
*[EventData[Data[@Name='SubjectUserName'] and (Data='test')]]
</Select>
</Query>
</QueryList>
When finished, give the Custom View entry a name and description.
Queries can include AND/OR operators.
<QueryList><Query Id="0">
<Select Path="Security">
*[EventData[Data[@Name='SubjectUserName'] and (Data='test' or Data=’testtwo’)]]
</Select>
</Query>
</QueryList>
To find additional fields to query on, access the details of an event entry and click on the XML view.
The query below looks for events that any data or field equals test
<QueryList><Query Id="0">
<Select Path="Security">
*[EventData[Data and (Data='test' )]]
</Select>
</Query>
</QueryList>
Thursday, September 1, 2011
Microsoft iSCSI Software Target
Microsoft has released iSCSI Software Target version 3.3, which can turn a Windows Server 2008 R2 server into an iSCSI target. This free component provides storage over a TCP/IP network to clients using an iSCSI initiator software, such as the Microsoft iSCSI Software Initiator Version 2.08 (also free) for Windows computers. There's also an iSCSI client inside the target package.
The iSCSI Software Target version 3.3 can be downloaded at:
http://www.microsoft.com/download/en/details.aspx?id=19867
Once downloaded and extracted, several folders will be present:
The 64-bit folder should include two .MSI files:
Once installed, a new shortcut will appear under the Administrative Tools folder:
Right-click iSCSI Targets and select Create iSCSI Target.
Enter a name and description for the target.
Enter the iSCSI Qualified Name (IQN) for the target.
Right-click Devices and select the Create Virtual Disk option.
Enter the path for the .VHD file.
Enter the size of the .VHD file in MB’s.
Enter a description of the .VHD file.
Add the iSCSI target created previously.
Right-click the new Device entry and select Disk Access –> Mount Read/Write.
At this point, clients should be able to connect to the iSCSI target. In the example below, the free iSCSI Initiator was installed on a XP client. The node name is on the General tab.
To have the client view the available target, this value was added to the server.
Sunday, May 1, 2011
Enumerate roles on a Windows 2008 R2 Server using PowerShell
The two PowerShell commands below will enumerate roles on a Windows 2008 R2 Server. The same data can be found via the Server Manager GUI, but the PowerShell option can create an overall list.
import-module servermanager
get-windowsfeature
Friday, April 1, 2011
DHCP Server address conflict parameter with Windows Server
Using the DHCP Server component within Windows Server, an option is present to attempt to detect IP address conflicts. To access this option, right-click the IPv4 node in the DHCP management console and click on the Properties selection.
Access the Advanced tab. The default value is 0; enter 1 to have the service attempt to verify the address value it is about to assign is not currently in use.
Tuesday, February 1, 2011
Backing up print queues on a Windows 2008 R2 Server
To back up existing print queues on a Windows 2008 R2 Server, type “print management” or printmanagement.msc in the search dialog box. Once launched, click on Print Servers to explain the list. Right-click on the print server that contains the printer queues, and select the Export printers to a file menu option.
A wizard will walk through several screens including selecting a name and file location for the export. When the process has completed, a file with an extension of .printerExport should be present.
Saturday, October 2, 2010
Priority of network interfaces within Windows
To determine the priority of available network interfaces within Windows, launch a command prompt and use the following command:
netstat –rn
Near the top of the information will be a list of all of the network interfaces and a priority number in a column to the left. The loopback entry will normally be the lowest.
If you wish to change the priority list, access the TCP/IP properties for the interface in question and remove the default checkbox for “Automatic metric” and manually enter a value. A value higher than 1 is probably preferred as not to interfere with the loopback address entry.
Friday, October 1, 2010
ADRecycleBin
ADRecycleBin (Active Directory Recycle Bin) allows administrators to quickly restore deleted Active Directory objects via an easy to use GUI. The tool supports Windows 2008 R2 Active Directory Recycle Bin technology, supports Object reanimation in earlier versions of Active Directory, the review of deleted object, and allows you to restore multiple objects at the same time.
Sunday, May 2, 2010
Detecting an IP address conflict with Microsoft’s DHCP Server
An IP address conflict detection option can be enabled within Microsoft’s DHCP Server software by accessing the Properties of the node and setting the Conflict Detection Attempts to a value other than 0.
A value other than 0 will mean the server will send a ping request for the address in question before assigning it.
Back up the System State with Windows Server 2008 R2
To back up the system state with Windows Server 2008 R2, install the Backup feature. Then launch a command prompt and use:
wbadmin start systemstatebackup –backupTarget:VolumeName
Friday, March 5, 2010
System Health Report for 2008 Server
A system health report can be generated with 2008 Server using the following command via the Start Menu:
generate system health report
Friday, January 1, 2010
Change the listening port for RDP
The default listening port for RDP is normally 3389. To change this value, run Regedit and go to this key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp
Find the "PortNumber" subkey and notice the value of 00000D3D, hex for (3389). Modify the port number in Hex and save the new value.
Friday, December 4, 2009
Core Configurator
Core Configurator is a piece of software designed to offer some GUI configuration options for a Windows Server Core installation.