Saturday, October 4, 2008

Hyper-V Beta And RC0

Problems with upgrading to RC0:
Had to recreate the virtual machine definitions after upgrading from the beta Hyper-V to RC0. Later found the link below:
Virtual machines that were created on the beta version of the Hyper-V role do not start after the Hyper-V role is updated to a later version
http://support.microsoft.com/kb/949222/

Installing Fedora 8 In Hyper-V
Installed Fedora 8 as guest in Hyper-V successfully by clicking next.
Network worked after adding a legacy network interface.
Mouse in Fedora with out the work around detailed in the page below.
Fedora 8 (werewolf) on Virtual PC 2007

Linux Integration Components for Microsoft Hyper-V
Adding the Xen kernel with out the Linux Integration Components seems to make little noticable change.
Web pages below detail configuring a non supported system for Linux Integration Componets.
Hyper-V Integration Components in x86_64 CentOS and RHEL
Hyper-V Integration Components in SuSE 10
Linux Integration Components for Microsoft Windows Server 2008 Hyper-V

RemovePrinters.vbs

This script enumerates the unc mapped printers for the logged on user on a Windows XP system and remove the printers.
removeprinters.vbs:
Set WshNetwork = WScript.CreateObject(”WScript.Network”)
Set oPrinters = WshNetwork.EnumPrinterConnections
For enumi = 0 to oPrinters.Count - 1 Step 2
WScript.Echo “Port ” & oPrinters.Item(enumi) & ” = ” & oPrinters.Item(enumi+1)
if left(oPrinters.Item(enumi+1),2) = “\\” then
WshNetwork.RemovePrinterConnection oPrinters.Item(enumi+1), true, true
end if
Next

Using DSQUERY To List User Without Exchange Accounts

This command searches the active directory for users accounts which don’t have an exchange account as indicated by a blank/null homeMDB property.
dsquery * “dc=example,dc=com” -filter “(&(objectCategory=person)(objectClass=user)(!homeMDB=*))” -limit 0 | dsget user -samid -dn -disabled

Using DSQUERY To List Bad Password Count

List Bad Password Count
This can be handy to quickly determine if there is some sort of password attack taking place on a domain.
The command searches all records in the domain “*” which match the filter of being a user account and returns the specified attributes which include bad password count.
Note that the property badPasswordTime is raw a requires processing to turn in to a format of date time (see http://www.microsoft.com/technet/scriptcenter/topics/win2003/lastlogon.mspx).
Also the attribute is not replicated between domain controllers so each one will need to be queried.
The command below performs a query filtering for user objects and returning attributes from the user account to help idenify the account.
dsquery * “dc=example,dc=com” -filter “(&(objectCategory=person)(objectClass=user))” -attr sAMAccountName badPwdCount badPasswordTime userAccountControl distinguishedName -limit 0 -s servername.example.com
The list from the above command could be quite long so you would probably want to redirect the out put to a text file by modify the command line to:
dsquery * “dc=example,dc=com” -filter “(&(objectCategory=person)(objectClass=user))” -attr sAMAccountName badPwdCount badPasswordTime userAccountControl distinguishedName -limit 0 -s servername.example.com > c:\temp\dsquery_badpwdcount.txt