Install Windows-agent using Active Directory¶
Agent installation with AD group policy¶
Download agent installer from admin panel of StaffCop:
Control panel
![../_images/active_install_1.png](../_images/active_install_1.png)
Copy the agent installer downloaded from the server to the domain controller, file named agent_ru-5.8.2465-[192.168.1.134].msi.
Place this file to C:\sc directory on your computer and open network sharing to open \ \name_of_the_domain_controller\sc$
Open Control Panel (or Start menu in Windows 2003/2008) and choose Administration\Active Directory — users and computers.
![../_images/active_install_2.png](../_images/active_install_2.png)
In the domain with the computers meant for agents installation, create a new Organizational Unit and name it StaffCop, for example.
To do that choose Create\OU in the context menu. Specify the name of a new OU in the open dialog and click OK.
Include the computers meant for StaffCop agents installation in this OU.
![../_images/active_install_3.png](../_images/active_install_3.png)
Open the window of editing the group policies.
To do that click Start/Administration/Managing the group policy.
![../_images/active_install_4.png](../_images/active_install_4.png)
Specify the group policy for StaffCop OU that you have just created.
To do that open the context menu of StaffCop OU, choose item Create” a GPO object on this domain and bind it…
Specify the name of the new GPO object in the appeared window and click OK
Choose Change in the context menu of the new GPO.
![../_images/active_install_5.png](../_images/active_install_5.png)
![../_images/active_install_6.png](../_images/active_install_6.png)
You will see the window of GPO editor where you should input the settings for the GPO you created before.
To do that choose item PC configuration/Policies/Programs configuration/Programs installation.
Choose New -> Package in the context menu of the item Software installation.
![../_images/active_install_7.png](../_images/active_install_7.png)
Then specify the installation path for an Agent.
To do that input the address of the network shared resource.
The path to the directory with the package should be in the format of the network addresses:
\ \name_of_the_domain_controller\sc\agent_ru-5.8.2465-[192.168.1.134].msi.
The window Deploy software will open. Choose Assigned. Click OK.
![../_images/active_install_8.png](../_images/active_install_8.png)
Agents will be installed on the chosen computers in the moment they are registered in the domain.
The forced applying of GPO may be required, for that you should invoke the forced GPO upgrade in the Windows command line:
gpupdate /force
And accept to reboot the PC.
Agent update with AD group policy¶
Similar to agent installation, add the agent installer you want to update to, in this window:
![../_images/active_install_13.png](../_images/active_install_13.png)
Open new agent properties, then “Updates” tab, click “Add” to choose the application meant for update by the agent.
Choose the older version of the agent (if the new version is located in the same GPO - choose it from this GPO, if it’s located in some other GPO - specify it using “Browse” dialog). Below you can choose if you want to remove the previous version or install the new version over it. We recommend to remove the previous version in order not to inherit the troubles from old versions to new ones.
![../_images/active_install_11.png](../_images/active_install_11.png)
After that, in the GPO you will see the old packages with the lock icon and new ones with the green arrow icon.
![../_images/active_install_12.png](../_images/active_install_12.png)
Note
If you have installed the agent using GPO you must update them only using GPO
Agent uninstallation with AD group policy¶
To uninstall a StaffCop agent from workstations use the tool of GPO managing and find the GPO where you configured the installation of the StaffCop agent.
Click the GPO with the right mouse button and choose Change in the dropped menu:
PC configuration/Policies/Programs configuration/Programs installation
Remove the previously added agent from the list of StaffCop agents to be installed on the workstations.
The package assigned for installation may be named «Network Service» there.
![../_images/active_install_10.png](../_images/active_install_10.png)
Then close all the windows of this GPO and reboot the client’s workstation or invoke the forced GPO upgrade in the command line:
gpupdate /force
And accept to reboot the user’s workstation