We have been using Lansweeper for a couple of months and I really need to congratulate Geert Moernaut for such a great job. Necessity is the mother of al inventions, and we had to come up with a way of organizing our Lansweeper collected machines via OU. We've constructed a simple report which I'm sharing with you - eventually it will help. It is based on version 3.1.
(Only tested it on an AD Domain with Windows XP machines or superior and all examples verified on Microsoft SQL Server 2005).
Steps to reproduce:
1. On the management console, move to Configuration and Scanned Registry Keys.
2. Add the following key to HKLM: SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine
3. Use Distinguished-Name as RegValue.
4. Create a new view (in this example, it is named web30FirstOU):
CREATE VIEW web30FirstOU
AS
SELECT SUBSTRING(Value, CHARINDEX('=', Value, CHARINDEX('=', Value, 1) + 1) + 1,
CHARINDEX('=', Value, CHARINDEX('=', Value, CHARINDEX('=', Value, 1) + 1) + 1)
- CHARINDEX('=', Value, CHARINDEX('=', Value, 1) + 1) - 4) AS FirstOU, Computername
FROM tblRegistry
WHERE (Valuename = 'Distinguished-Name') AND
(Regkey = 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine')
(This will create a view with two simple columns - computername and FirstOU, based on string delimiters from the AD DN (Distinguished-Name); may not be used without changes on multiple level OUs and definitely does not work on W2K)
5. Create a new view (or report) named web30OUComputers (again, just an example)
CREATE VIEW web30OUComputers
AS
SELECT tblComputers.Domain, web30FirstOU.FirstOU, tblComputers.Computername, tblADusers.Displayname, tblComputers.Lastseen,
tblComputersystem.Manufacturer, tblComputersystem.Model
FROM tblComputers INNER JOIN
tblComputersystem ON tblComputers.Computername = tblComputersystem.Computername INNER JOIN
tblADusers ON tblComputers.Username = tblADusers.Username LEFT OUTER JOIN
web30FirstOU ON tblComputers.Computername = web30FirstOU.Computername
6. Place the web30OUComputers view/report wherever you need it to be.
7. Should you need to reflect any changes made on AD, just logoff/logon, restart, wait for Group Policy to refresh or do a gpupdate /force. Just do not forget to rerun lsclient
8. Et voilà , a simple report with all your computers organized(able) by Active Directory OUs.
Just a contribution...
Geert, keep up the good work.