luni, martie 12, 2012

Copiere useri intre grupuri

Active Directory: Copy Distribution List Members to Another Distribution List

Summary: In this example, we will copy all members from one Distribution Group to another Distribution Group.

Copy the contents below, modify according to your organization and save as copymembers.vbs to C: drive


Const ADS_GROUP_TYPE_GLOBAL_GROUP = &H2

Set objOU = GetObject("LDAP://OU=Security Groups, dc=company, dc=com")
Set objOldGroup = GetObject("LDAP://CN=mysourcegroup, ou=security groups, dc=company, dc=com")
Set objNewGroup = GetObject("LDAP://CN=mytargetgroup, ou=security groups, dc=company, dc=com")

On Error Resume Next
For Each objUser in objOldGroup.Member
objNewGroup.Add "LDAP://" & objUser
Next


Open Command prompt:

C:\>cscript copymembers.vbs


The script will copy all members in the "mysourcegroup" Distribution List to your "mytargetgroup" Distribution List.

vineri, iulie 22, 2011

Windows install de pe USB

Personal m-am saturat sa tot folosesc DVD pentru a instala Windows asa ca:

Creating a Bootable USB drive

You can use the ISO file of Windows Server 2008 R2 to create a bootable USB drive too.
For this scenario you need to create a bootable DVD first or mount the ISO file. After you have gained access to the files on the DVD or in the ISO file, simply type the following commands on a system with the image mounted or physical DVD copy in the drive and the USB device plugged in:

diskpart.exe

DISKPART> list disk

Select the USB device from the list and substitute the disk number below
when necessary

DISKPART> select disk 1
DISKPART> clean
DISKPART> create partition primary
DISKPART> select partition 1
DISKPART> active
DISKPART> format fs=fat32
DISKPART> assign
DISKPART> exit

xcopy X:\*.* /s/e/f Y:\

where X:\ is your mounted image or physical DVD and Y:\ is your USB
device

Dupa care se apuca USB-ul de capatul nemetalic, se implanta in computerul de instalat si se boot-eaza de pe el :)

PS: Merge si cu Windows 7 si cu 2k8

vineri, iunie 11, 2010

duminică, mai 30, 2010

duminică, mai 16, 2010