Re: Mapped Drives SMS_DEF.MOF Issue
- From: "BDA" <ba@xxxxxxxxxxxx>
- Date: 22 Jan 2007 08:25:11 -0800
Garth:
I was able to follow your procedure, make a few modifications to my
SMS_DEF.MOF and generate the results I was looking for. Thank you very
much.
I'm still a bit confused over what the real issue was with my inventory
issue???
I know I didn't have the pragma deleteclass in there or the special
formatting around FreeSapce and Size.
I assume in step 2), you also wanted the MOF compiled on the server?
Why was step 7) executed After the Hardware cycle? Wouldn't you want
the the VBS code to run, populate the WMI, then grab it with Inventory.
Again, my thanks for your diligent efforts.
Garth wrote:
I have used datashift drive to capture the data that you wanted into my test
lab. These are the procedures that I used.
http://smsug.ca/cs/blogs/garth_jones/archive/2007/01/20/120.aspx
and yes you can pull data from the Registry for example HKEY_LOCAL_MACHINE,
but you can't pull data for HKEY_CURRENT_USER since the current user will be
"local system" and not the user logon to the PC.
"BDA" <ba@xxxxxxxxxxxx> wrote in message
news:1169143958.782058.227970@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I believe this quote from Technet kills it..
"When the Hardware Inventory Agent runs on clients, it runs in the
context of the local system account. The agent queries WMI for required
data using that context. In some cases (such as environment variables),
WMI returns data for all user profiles defined on the computer. In
other cases (for example, any file or print shares the user has
connected to), WMI returns data for the context in which the data is
requested, as opposed to the currently logged-on user. Data collected
by hardware inventory might not include the details you expected it to
collect. In the example of file and print shares, SMS hardware
inventory does not include the user's share connections, because the
hardware inventory agent does not run in the user account's context."
I also could not find anywhere on the net of anyone resolving this.
Pulling from the registry would also be futile because that information
is kept in the user key side of things which would experience the same
problems as listed above.
Garth wrote:
In this case the data is pull dynamically, so therefore it will not be
return via the hardware inventory since the local system does not have
any
mapped drives. J
This is what I hink that SMS Addon shoudl look like within the
SMS_def.mof,
//----------------------
// Mapped Drive Inventory
//----------------------
#pragma namespace("\\\\.\\root\\cimv2\\SMS")
#pragma deleteclass("SMX_Drives ",NOFAIL)
[SMS_Report(TRUE), SMS_Group_Name("SMX Drives"),
SMS_Class_ID("SMSExpert|SMXDrives|1.0")]
class SMX_Drives : SMS_Class_Template
{
[SMS_Report(TRUE)] Boolean Compressed;
[SMS_Report(TRUE)] string Description;
[SMS_Report(TRUE),key] string DeviceID;
[SMS_Report(TRUE)] Uint32 DriveType;
[SMS_Report(TRUE)] string FileSystem;
[SMS_Report(TRUE)] Uint64 FreeSpace;
[SMS_Report(TRUE)] Uint32 MediaType;
[SMS_Report(TRUE)] string Name;
[SMS_Report(TRUE)] string ProviderName;
[SMS_Report(TRUE)] Uint64 Size;
[SMS_Report(TRUE)] string VolumeName;
[SMS_Report(TRUE)] sring VolumeSerialNumber;
};
"BDA" <ba@xxxxxxxxxxxx> wrote in message
news:1169064387.492458.34650@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Have done that, but no reply just yet.
How would the code look if I decided to just pull this from
\\root\cimv2, and then the Win32_LogicalDisk class?
I know the same data is in there from running Wbemtest, but I'm not
quite sure how to modify my SMS_DEF.MOF to pull from there....
Has anyone tried this approach to pull a list of network drives?
Garth wrote:
You can always send an email to the MOF Master, she is always will to
help
out.
"BDA" <ba@xxxxxxxxxxxx> wrote in message
news:1169057736.001728.235910@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Garth:
I changed the key to the DeviceId, but the results are the same.
Your change made sense judging from the way the data is represented
in
wbemtest. I simply copied the MOF update from another who had
implemented this drive hardware inventory code.
Still testing here, let me know if you have any other ideas...
Garth wrote:
I have notice a typo within your MOF file, it is Deviceid that is
the
key
and not Name. try find that and lets us know.
"BDA" <ba@xxxxxxxxxxxx> wrote in message
news:1169048557.792615.316480@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Garth:
I've been watching those logs. Nothing in dataldr.log, there are
some
errors related to another set of Inventory I'm grabbing using the
sms_def.mof file, but no errors on any later sections including
the
mapped drives.
I'm thinking the issue is that the hardware inventory is running
under
the system account and therefore doesn't see the same data in WMI
that
I see when I run under my account.
I'm continuing to test...
Garth wrote:
Force an inventory cycle to occur on the WS and look at the log
files.
Check the InventoryAgent.log on the client to see if there are
any
errors?
Are there any errors within the Dataldr.log?
"BDA" <ba@xxxxxxxxxxxx> wrote in message
news:1168982319.754492.139120@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Yes Garth it did return ALL of my drives.
Thanks for your help...
Garth wrote:
Have you use Wbemtest to check the results on the local PC?
To do so.
Start| Run | Wbemtest
click Connect
Change to root\cimv2 click connect.
select "enum classes" then "recursive" then ok.
Find SMX_Drives and double click it.
click Instances
Do you see all you mapped drivers?
"BDA" <ba@xxxxxxxxxxxx> wrote in message
news:1168976211.124181.176770@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Actually, it was run under my admin user account on the
test
machine
in
question. i.e., it was run manually and not from an SMS
package.
Garth wrote:
Which account is executing the datashift-drives.vbs? If it
is
the
local
system account then you will not get any map network
drives.
"BDA" <ba@xxxxxxxxxxxx> wrote in message
news:1168971601.565794.48030@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I'm attempting to collect the mapped network drives of
my
SMS
Advanced
Clients in our SMS 2003 environment.
I'm working with the Datashift-Drives.vbs. I've added
the
following
to
my SMS_DEF.MOF file to collect this information from the
test
client:
*************
//----------------------
// Mapped Drive Inventory
//----------------------
#pragma namespace("\\\\.\\root\\cimv2\\SMS")
[SMS_Report(TRUE),
SMS_Group_Name("SMX Drives"),
SMS_Class_ID("MICROSOFT|SMXDrives|1.0")]
class SMX_Drives : SMS_Class_Template
{
[SMS_Report(TRUE)]
Boolean Compressed;
[SMS_Report(TRUE)]
string Description;
[SMS_Report(TRUE)]
string DeviceID;
[SMS_Report(TRUE)]
Uint32 DriveType;
[SMS_Report(TRUE)]
string FileSystem;
[SMS_Report(TRUE)]
Uint64 FreeSpace;
[SMS_Report(TRUE)]
Uint32 MediaType;
[SMS_Report(TRUE), Key]
string Name;
[SMS_Report(TRUE)]
string ProviderName;
[SMS_Report(TRUE)]
Uint64 Size;
[SMS_Report(TRUE)]
string VolumeName;
[SMS_Report(TRUE)]
string VolumeSerialNumber;
};
This all appears to work in the Hardware Inventory
process
when I
force
a Hardware Inventory at the client level, however the
only
drive
displayed is my CD-ROM. Is this the intended behavior
of
the
script
or
is it to also to list out my mapped network drives (e.g.
my
Y:
&
Z
drives are mapped). I was also concerned about the
hardware
inventory
being executed via the system account vs. the logged on
account.
Any
help you could give me would be appreciated.
.
- Follow-Ups:
- Re: Mapped Drives SMS_DEF.MOF Issue
- From: Garth
- Re: Mapped Drives SMS_DEF.MOF Issue
- References:
- Mapped Drives SMS_DEF.MOF Issue
- From: BDA
- Re: Mapped Drives SMS_DEF.MOF Issue
- From: Garth
- Re: Mapped Drives SMS_DEF.MOF Issue
- From: BDA
- Re: Mapped Drives SMS_DEF.MOF Issue
- From: Garth
- Re: Mapped Drives SMS_DEF.MOF Issue
- From: BDA
- Re: Mapped Drives SMS_DEF.MOF Issue
- From: Garth
- Re: Mapped Drives SMS_DEF.MOF Issue
- From: BDA
- Re: Mapped Drives SMS_DEF.MOF Issue
- From: Garth
- Re: Mapped Drives SMS_DEF.MOF Issue
- From: BDA
- Re: Mapped Drives SMS_DEF.MOF Issue
- From: Garth
- Re: Mapped Drives SMS_DEF.MOF Issue
- From: BDA
- Re: Mapped Drives SMS_DEF.MOF Issue
- From: Garth
- Re: Mapped Drives SMS_DEF.MOF Issue
- From: BDA
- Re: Mapped Drives SMS_DEF.MOF Issue
- From: Garth
- Mapped Drives SMS_DEF.MOF Issue
- Prev by Date: Re: Mapped Drives SMS_DEF.MOF Issue
- Next by Date: Re: Mapped Drives SMS_DEF.MOF Issue
- Previous by thread: Re: Mapped Drives SMS_DEF.MOF Issue
- Next by thread: Re: Mapped Drives SMS_DEF.MOF Issue
- Index(es):
Relevant Pages
|
Loading