Showing posts with label Admin. Show all posts
Showing posts with label Admin. Show all posts

Monday, March 28, 2011

Windows cannot connect to the domain

Sometimes when you use a cloned machine or a virtual machine or anything that can make confusion about computer name/SID for a domain controller you will see that message and you won't be able to login to the machine with your active directory credential, one the easiest ways to solve the problem would be rejoining the machine to the domain again. if you don't know how to do that here are the steps :
  1. login with local administrator account then right click on "my computer" and select properties then select the "computer name" tab
  2. hit the change button , select the WORKGROUP radio and type a name
  3. confirm OK's all along but no restart required just now
  4. repeat the above steps but this time join the computer to desired domain (select Domain radio button instead)
  5. OK and restart

it solved my problem hope it works for you

Saturday, January 01, 2011

Hyper-V and the Hypervisor that does not run

The virtual machine could not be started because the hypervisor is not running ...
this it what I was getting when trying to run a Hyper-V virtual machine on my HP ML380 server, a quick search and the problem was found : you have to make some changes in your BIOS (that means your CPU should support virtualization), you should enable two setting in BIOS :

1- hardware-assisted data execution protection (DEP) (was enabled by default for me)
2- hardware-assisted virtualization

and keep in mind that some machines does not apply BIOS changes until it completely turned off (just a normal restart wouldn't do it)

the real problem appears when you still get the Hypervisor error after applying these settings, here comes the solution:
the problem with me was "Persian locale", I uninstalled everything about Persian in "Region and Language" section in control panel, then uninstalled the Hyper-V and then Installed it when there was only English (US) on my system, after that everything goes smooth and alright

Wednesday, December 29, 2010

How to Remove ESET Nod32 Antivirus When You Forget It's Password

Sometimes ago I managed to install a demo version of nod32 server management console and a few clients then during the initial configuration I add a simple password to make it more secure and as you may guess by the title the password did not work later so the anti virus wouldn't uninstall!.
after a few search in forums I came up to this solution :
1- open registry (Start > Run > Regedit)
2- follow the keys to this value
HKEY_LOCAL_MACHINE\SOFTWARE\Eset\Nod\CurrentVersion\Info\PackageID
3- right click and rename the PackageID thing to something else like packageID1 (you may have to restart in safe mode to be able to change the name)
4-restart and it's done, now you can uninstall it

Tuesday, September 09, 2008

Some Usefull VBScript Codes

Using shell scripts like vbscript can make your work much easier specially when you are a sys admin, you can run them in login process or any other OS specified time or even run them in a custom time/way, there is several ways to run them but I prefer to save the text in a text file with the extension of .vb like loginScript.vb it would be run like a executable remember that you should have installed Windows Host Scripting on machine, here is some small vbscript snippets :

Basic output


  • Wscript.Echo "Hello World,this is one way to display output..."

  • MsgBox "Hello World," & "this is another way..."


  • Basic input


  • Dim V
    V = InputBox("What the heck?")

  • Getting if user belonged to specified group


  • 'returns boolean

    Set oNetwork = CreateObject("WScript.Network")
    sDomain = oNetwork.UserDomain
    sUser = oNetwork.UserName
    bIsMember = False
    Set oUser = GetObject("WinNT://" & sDomain & "/" & _
    sUser & ",user")

    For Each oGroup In userObj.Groups
    If oGroup.Name = "Domain Users" Then
    bIsMember = True
    Exit For
    End If
    Next

  • Mapping


  • 'mapping drive
    Set oNet = WScript.CreateObject("WScript.Network")
    oNet.MapNetworkDrive "X:", "\\theServer\XFiles)

  • 'Mapping Printer
    Set oNet = WScript.CreateObject("WScript.Network")
    oNet.AddWindowsPrinterConnection "\\PrintServer\SecretPrinter"
    oNet.SetDefaultPrinter "\\PrintServer\SecretPrinter"

  • Getting IP address


  • 'localIp is the result
    Set myObj = GetObject("winmgmts:{impersonationLevel=impersonate}" & _
    "!//localhost".ExecQuery_
    ("select IPAddress from " & _
    "Win32_NetworkingAdapterConfiguration" & _" where IPEnabled=TRUE")
    'Go through the addresses
    For Each IPAddress in myObj
    If IPAddress.IPAddress(0) <> "0.0.0.0" Then
    LocalIP = IPAddress.IPAddress(0)
    Exit For
    End If
    Next
  •