Showing posts with label Windows. Show all posts
Showing posts with label Windows. Show all posts

Wednesday, March 20, 2013

Add IP Range To Windows Network Adapter From Command Line

for /L %a in (1,1,32) do netsh int ip add address "Local Area Connection" 192.168.0.%a 255.255.255.255
This will add 192.168.0.1 - 192.168.0.32 to the network adapter named "Local Area Connection"

You may need to change the adapter name to suite your specific adapter names.

Enable Windows RDP Through Windows Firewall From Command Line

netsh firewall set portopening TCP 3389 microsoft-rdp

Wednesday, September 5, 2012

Enable Audio Over RDP For Server 2008

1) Modify required services:
-Click Start -> Run -> Services.msc
-Change the startup type of "Windows Audio Endpoint Service" to automatic
-Change the startup type of "Windows Audio Service" to automatic
-Start both services if they are not started
-Close services

2) Modify the Terminal Services configuration:
-Click Start -> Run -> tsconfig.msc
-Right-click on the RDP-TCP connection in the right-hand pane
-Click the "Client Settings" tab and make sure that no items related to audio are disabled
-Close tsconfig

3) At this time, log out of the server and then log back in

4) Modify the registry
-Log back into your server as Administraor
-Click Start -> Run -> regedit
-Browse to: HKEY_CLASSES_ROOT\AudioEngine\AudioProcessingObjects
-On each subkey, right-click and click "Permissions" -> "Advanced" -> "Owner" tab and set the owenr to the "Administrators" group and click "OK"
-On the main "Permissions" window, click the "Administrators" group and give it "Full Control" and click "OK" to close the permissions window
-Click each subkey and in the right pane, modify the DWORD value of "MinOutputConnections" from 1 to 0, then click "OK"
-Close regedit

5) Restart audio services
-Click Start -> Run -> Services.msc
-Restart the "Windows Audio Service"
-Restart the "Windows Audio Endpoint Service"

6) At this time, log out of the server

7) Setup RDP
-Open the RDP connection dialogue
-Go to "Options" => "Local Resources" => "Configure Remote Audio Settings" and click "Play on this Computer"

8) At this time, log into the server

You should be all set!

Thursday, May 24, 2012

Recover Plesk Admin Password

For Plesk versions under 10.x on Windows:
"%plesk_bin%\plesksrvclient" -get
For Plesk versions over 10.x on Windows:
"%plesk_bin%\admin" --show-password
For Plesk on Linux:
cat /etc/psa/.psa.shadow

Wednesday, December 28, 2011

Export A List Of DSN Connections From Windows Server

Simply export the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI

Sunday, January 24, 2010

Verify group membership in Active Directory using LDAP

<?php
$ldap_server = ""; //IP ADDRESS OF LDAP
$ldap_dn = ""; //NAME OF AD FOREST
$ldap_gn = ""; //OU TO SEARCH MEMBERSHIP
$ldap_attr = array("*"); //RETURN ALL ATTRIBUTS
$ldap_filter = "samaccountname=".$user; //SPECIFIC USER 

$ad = ldap_connect($ldap_server);
$lv = ldap_set_option($ad, LDAP_OPT_PROTOCOL_VERSION, 3);
$bd = ldap_bind($ad,$ldap_user,$ldap_password);
$result = ldap_search($ad, $ldap_dn, $ldap_filter, $ldap_attr);
$entries = ldap_get_entries($ad, $result);

//CHECK IF USER IS IN $ldap_gn
$belongs = in_array($ldap_gn,$entries[0]['memberof']) ? TRUE : FALSE; 
?>