SCCM 2012 report on computers with local shares and share permissions

Very new to SCCM 2012, want to put together a report to show computers with local shares and the permissions on those shares (for security purposes, need to investigate any systems that have open shares_.

Managed to add and now collecting information that populates v_gs_share and I have a handle on the report itself, just wondering how to collect the share permissions - I've seen other qustions on the boards that are similar but reference earlier versions of SCCM so wondering how to do it in 2012.

Thanks

July 16th, 2013 12:06pm

If you find a solution for older version of CM, then it would be the same process for CM12.

Free Windows Admin Tool Kit Click here and download it now
July 17th, 2013 12:29am

Hi,

 If you just want a report, look at sms_def.mof, and enable the win32_share class and attributes.  Then you could get reports of computers' Shares, whether they exist or not.
July 17th, 2013 4:57am

There seem to be significant differences between the versions - ie in older versions the solution to enable shares was to change the sms_def.mof which no longer exists in 2012 - the solution now was to go into Hardware Inventory -> Set Classes and select Shares, which is why I'm comfortable trying to use older solutions.

The post I was referencing - uses sms_def.mof which doesn't appear to exist in 2012:

http://www.myitforum.com/articles/8/view.asp?id=9597

Am I missing something here?  There is a configuration.mof, but things like Shares I was able to enable through the console without modifying the configuration.mof file.

Free Windows Admin Tool Kit Click here and download it now
July 17th, 2013 11:15am

Juke - I'm using SCCM 2012, AFAIK the sms_def.mof no longer exists.
July 17th, 2013 11:16am

The basic steps are still the same, the only difference is that the sms_def.mof stuff is now part of the console under the client setting / hardware inventory.
Free Windows Admin Tool Kit Click here and download it now
July 17th, 2013 11:31am

There is no shareperms in the console.
July 17th, 2013 11:33am

There is no shareperms in the console.

That is true... There is no share permission in the sms_def.mof by default or in the CM12 client settings. you will need to import the mof.
Free Windows Admin Tool Kit Click here and download it now
July 17th, 2013 1:13pm

There seem to be significant differences between the versions - ie in older versions the solution to enable shares was to change the sms_def.mof which no longer exists in 2012 - the solution now was to go into Hardware Inventory -> Set Classes and select Shares, which is why I'm comfortable trying to use older solutions.

The post I was referencing - uses sms_def.mof which doesn't appear to exist in 2012:

http://www.myitforum.com/articles/8/view.asp?id=9597

Am I missing something here?  There is a configuration.mof, but things like Shares I was able to enable through the console without modifying the configuration.mof file.

  • Edited by baal32 Wednesday, July 17, 2013 3:20 PM added link
July 17th, 2013 6:14pm

Juke - I'm using SCCM 2012, AFAIK the sms_def.mof no longer exists.
  • Edited by baal32 Wednesday, July 17, 2013 3:15 PM Editted
Free Windows Admin Tool Kit Click here and download it now
July 17th, 2013 6:14pm

There seem to be significant differences between the versions - ie in older versions the solution to enable shares was to change the sms_def.mof which no longer exists in 2012 - the solution now was to go into Hardware Inventory -> Set Classes and select Shares, which is why I'm comfortable trying to use older solutions.

The post I was referencing - uses sms_def.mof which doesn't appear to exist in 2012:

http://www.myitforum.com/articles/8/view.asp?id=9597

Am I missing something here?  There is a configuration.mof, but things like Shares I was able to enable through the console without modifying the configuration.mof file.

  • Edited by baal32 Wednesday, July 17, 2013 3:20 PM added link
July 17th, 2013 6:14pm

Juke - I'm using SCCM 2012, AFAIK the sms_def.mof no longer exists.
  • Edited by baal32 Wednesday, July 17, 2013 3:15 PM Editted
Free Windows Admin Tool Kit Click here and download it now
July 17th, 2013 6:14pm

There seem to be significant differences between the versions - ie in older versions the solution to enable shares was to change the sms_def.mof which no longer exists in 2012 - the solution now was to go into Hardware Inventory -> Set Classes and select Shares, which is why I'm comfortable trying to use older solutions.

The post I was referencing - uses sms_def.mof which doesn't appear to exist in 2012:

http://www.myitforum.com/articles/8/view.asp?id=9597

Am I missing something here?  There is a configuration.mof, but things like Shares I was able to enable through the console without modifying the configuration.mof file.

  • Edited by baal32 Wednesday, July 17, 2013 3:20 PM added link
July 17th, 2013 6:14pm

Juke - I'm using SCCM 2012, AFAIK the sms_def.mof no longer exists.
  • Edited by baal32 Wednesday, July 17, 2013 3:15 PM Editted
Free Windows Admin Tool Kit Click here and download it now
July 17th, 2013 6:14pm

There seem to be significant differences between the versions - ie in older versions the solution to enable shares was to change the sms_def.mof which no longer exists in 2012 - the solution now was to go into Hardware Inventory -> Set Classes and select Shares, which is why I'm comfortable trying to use older solutions.

The post I was referencing - uses sms_def.mof which doesn't appear to exist in 2012:

http://www.myitforum.com/articles/8/view.asp?id=9597

Am I missing something here?  There is a configuration.mof, but things like Shares I was able to enable through the console without modifying the configuration.mof file.

  • Edited by baal32 Wednesday, July 17, 2013 3:20 PM added link
July 17th, 2013 6:14pm

Juke - I'm using SCCM 2012, AFAIK the sms_def.mof no longer exists.
  • Edited by baal32 Wednesday, July 17, 2013 3:15 PM Editted
Free Windows Admin Tool Kit Click here and download it now
July 17th, 2013 6:14pm

There seem to be significant differences between the versions - ie in older versions the solution to enable shares was to change the sms_def.mof which no longer exists in 2012 - the solution now was to go into Hardware Inventory -> Set Classes and select Shares, which is why I'm comfortable trying to use older solutions.

The post I was referencing - uses sms_def.mof which doesn't appear to exist in 2012:

http://www.myitforum.com/articles/8/view.asp?id=9597

Am I missing something here?  There is a configuration.mof, but things like Shares I was able to enable through the console without modifying the configuration.mof file.

  • Edited by baal32 Wednesday, July 17, 2013 3:20 PM added link
July 17th, 2013 6:14pm

Juke - I'm using SCCM 2012, AFAIK the sms_def.mof no longer exists.
  • Edited by baal32 Wednesday, July 17, 2013 3:15 PM Editted
Free Windows Admin Tool Kit Click here and download it now
July 17th, 2013 6:14pm

There seem to be significant differences between the versions - ie in older versions the solution to enable shares was to change the sms_def.mof which no longer exists in 2012 - the solution now was to go into Hardware Inventory -> Set Classes and select Shares, which is why I'm comfortable trying to use older solutions.

The post I was referencing - uses sms_def.mof which doesn't appear to exist in 2012:

http://www.myitforum.com/articles/8/view.asp?id=9597

Am I missing something here?  There is a configuration.mof, but things like Shares I was able to enable through the console without modifying the configuration.mof file.

  • Edited by baal32 Wednesday, July 17, 2013 3:20 PM added link
July 17th, 2013 6:14pm

Juke - I'm using SCCM 2012, AFAIK the sms_def.mof no longer exists.
  • Edited by baal32 Wednesday, July 17, 2013 3:15 PM Editted
Free Windows Admin Tool Kit Click here and download it now
July 17th, 2013 6:14pm

So, where are you at?  The script is running, and the clients have the data in their local WMI namespace, root\cimv2\sms_sharepermissions ?

So all that's left is to modify hardware inventory to pull that custom WMI Namespace in?  If so, it's not too horrid.  Take note of a workstation (or server) to which you have remote rights to; and which has run the script, so that on THAT specific machine, root\cimv2\SMS_SharePermissions exists.

In your CM12 Console, Administration, Client Settings.  Right-click "Default Client Settings", Properties.  On the left, select "hardware inventory".  then on the right, Set classes..., now the fun part.

Add...

Connect..., and put in ThatServerOrWorkstation (for computername), and wmi namespace is root\cimv2.  Click the option "recursive", Connect.  (the trick here is rights to the target).

From the results, it might be easiest to click on "classname" at the top for sorting, then go find SMS_SharePermissions.  Select that, ok ok ok ok (however many times you need to agree); and... we're done here.  Sit and wait for inventory to report that data up.  If you're paranoid, you can monitor dataldr.log; and force policy refreshes and hinv deltas on some boxes; but the key is patience.  if you think you've waited long enough; you probably haven't.  ;)

July 17th, 2013 7:28pm

Much appreciated!  

We only started setting up SCCM 2012 2 weeks ago (and we've never used the previous versions), so I really appreciate your hand-holding through steps and concepts which are probably very obvious to people who have worked with this technology before.

 
Free Windows Admin Tool Kit Click here and download it now
July 17th, 2013 7:35pm

Hi all,

Sorry to re-hash an old post but I am trying to do exactly this...

I have run the vbs referred to in Sherry Kissingers post - http://www.myitforum.com/articles/8/view.asp?id=9597 on a test server, however I cannot see the new 'SMS_SharePerms' class i.e. by running 'Get-WmiObject -Namespace root/cimv2/sms -Class SMS_SharePerms' on that box????

UPDATE: when running VBS (turning off on error resume next) I get the following error - C:\Temp\SharePermissions.vbs(59, 1) SWbemServicesEx: Not found

Alternativly, has anybody else been able to solve this another way? I know I could easily run powershell gwmi scripts across all servers (win32_LogicalShareaccess) but would prefer the data to be integrated with SCCM.


June 26th, 2014 11:21pm

Hi all,

Sorry to re-hash an old post but I am trying to do exactly this...

I have run the vbs referred to in Sherry Kissingers post - http://www.myitforum.com/articles/8/view.asp?id=9597 on a test server, however I cannot see the new 'SMS_SharePerms' class i.e. by running 'Get-WmiObject -Namespace root/cimv2/sms -Class SMS_SharePerms' on that box????

UPDATE: when running VBS (turning off on error resume next) I get the following error - C:\Temp\SharePermissions.vbs(59, 1) SWbemServicesEx: Not found

Alternativly, has anybody else been able to solve this another way? I know I could easily run powershell gwmi scripts across all servers (win32_LogicalShareaccess) but would prefer the data to be integrated with SCCM.


Free Windows Admin Tool Kit Click here and download it now
June 27th, 2014 6:17am

Hi all,

Sorry to re-hash an old post but I am trying to do exactly this...

I have run the vbs referred to in Sherry Kissingers post - http://www.myitforum.com/articles/8/view.asp?id=9597 on a test server, however I cannot see the new 'SMS_SharePerms' class i.e. by running 'Get-WmiObject -Namespace root/cimv2/sms -Class SMS_SharePerms' on that box????

UPDATE: when running VBS (turning off on error resume next) I get the following error - C:\Temp\SharePermissions.vbs(59, 1) SWbemServicesEx: Not found

Alternativly, has anybody else been able to solve this another way? I know I could easily run powershell gwmi scripts across all servers (win32_LogicalShareaccess) but would prefer the data to be integrated with SCCM.


June 27th, 2014 6:17am

Hi all,

Sorry to re-hash an old post but I am trying to do exactly this...

I have run the vbs referred to in Sherry Kissingers post - http://www.myitforum.com/articles/8/view.asp?id=9597 on a test server, however I cannot see the new 'SMS_SharePerms' class i.e. by running 'Get-WmiObject -Namespace root/cimv2/sms -Class SMS_SharePerms' on that box????

UPDATE: when running VBS (turning off on error resume next) I get the following error - C:\Temp\SharePermissions.vbs(59, 1) SWbemServicesEx: Not found

Alternativly, has anybody else been able to solve this another way? I know I could easily run powershell gwmi scripts across all servers (win32_LogicalShareaccess) but would prefer the data to be integrated with SCCM.


Free Windows Admin Tool Kit Click here and download it now
June 27th, 2014 6:17am

Hi all,

Sorry to re-hash an old post but I am trying to do exactly this...

I have run the vbs referred to in Sherry Kissingers post - http://www.myitforum.com/articles/8/view.asp?id=9597 on a test server, however I cannot see the new 'SMS_SharePerms' class i.e. by running 'Get-WmiObject -Namespace root/cimv2/sms -Class SMS_SharePerms' on that box????

UPDATE: when running VBS (turning off on error resume next) I get the following error - C:\Temp\SharePermissions.vbs(59, 1) SWbemServicesEx: Not found

Alternativly, has anybody else been able to solve this another way? I know I could easily run powershell gwmi scripts across all servers (win32_LogicalShareaccess) but would prefer the data to be integrated with SCCM.


June 27th, 2014 6:17am

Hi all,

Sorry to re-hash an old post but I am trying to do exactly this...

I have run the vbs referred to in Sherry Kissingers post - http://www.myitforum.com/articles/8/view.asp?id=9597 on a test server, however I cannot see the new 'SMS_SharePerms' class i.e. by running 'Get-WmiObject -Namespace root/cimv2/sms -Class SMS_SharePerms' on that box????

UPDATE: when running VBS (turning off on error resume next) I get the following error - C:\Temp\SharePermissions.vbs(59, 1) SWbemServicesEx: Not found

Alternativly, has anybody else been able to solve this another way? I know I could easily run powershell gwmi scripts across all servers (win32_LogicalShareaccess) but would prefer the data to be integrated with SCCM.


Free Windows Admin Tool Kit Click here and download it now
June 27th, 2014 6:17am

Hi all,

Sorry to re-hash an old post but I am trying to do exactly this...

I have run the vbs referred to in Sherry Kissingers post - http://www.myitforum.com/articles/8/view.asp?id=9597 on a test server, however I cannot see the new 'SMS_SharePerms' class i.e. by running 'Get-WmiObject -Namespace root/cimv2/sms -Class SMS_SharePerms' on that box????

UPDATE: when running VBS (turning off on error resume next) I get the following error - C:\Temp\SharePermissions.vbs(59, 1) SWbemServicesEx: Not found

Alternativly, has anybody else been able to solve this another way? I know I could easily run powershell gwmi scripts across all servers (win32_LogicalShareaccess) but would prefer the data to be integrated with SCCM.


June 27th, 2014 6:17am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics