Report on NTFS Permissions

Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 15 years and 7 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
jhicks
Posts: 1789
Last visit: Mon Oct 19, 2015 9:21 am

Report on NTFS Permissions

Post by jhicks »

This is why you have to try Wbemtest!! Get out of script. Can you connect with the current credentials and query the win32_computersystem on the local computer? You can't use alternate credentials. This will tell you if WMI is working or hosed.And to be 100% clear, for both PSH and CMD shells, I'm talking about right-clicking on the menu icon and selecting Run as Administrator. You need to do this in Vista in addition to using an Admin credential. But WBEMTest first.
User avatar
goldyfarbs
Posts: 239
Last visit: Thu Mar 07, 2013 8:15 am

Report on NTFS Permissions

Post by goldyfarbs »

Jeff -

Only god knows what I am doing wrong...

I went to the wbemtest.exe and click -"Run as administrator" and ran
Select * from Win32_Computersystem and get "Access Denied"

jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Report on NTFS Permissions

Post by jvierra »

Here is where you could start which would simplify all of this tremendously.

PS>$rules=Get-Acl c:boot.iniPS>$rules.sddl

O:BAG:SYD:PAI(A;;FA;;;SY)(A;;FA;;;BA)(A;;0x1200a9;;;PU)

This string is the most basic and complete form of an ACE dump. Evry charracter and character pair can be easily decoded into set of standard permissions. In the case of a hex value you can decode using a switch or filter.

If you are trying to decode to a GUI dialog then just and the mask with the bit for each line in the display and the GUI will do the decode for you. This is the way teh Windows GUI works.

You can also launch the Windows Permissions dialog with a file name from PowerShell and VBS.
User avatar
jhicks
Posts: 1789
Last visit: Mon Oct 19, 2015 9:21 am

Report on NTFS Permissions

Post by jhicks »

Jim,Josh's problem is more generally WMI related on Vista. We're trying to determine if its Vista or a hosed WMI.
User avatar
goldyfarbs
Posts: 239
Last visit: Thu Mar 07, 2013 8:15 am

Report on NTFS Permissions

Post by goldyfarbs »

Jeff,

I have made no headway on my wmi issue now..




Brutal, I am pulling my hair out... I am in elevated shell and I even logged in with local admin account and not domain account, still have issues..

I have recreated the WMI repository as well and still getting errors.. Lovely...
User avatar
jhicks
Posts: 1789
Last visit: Mon Oct 19, 2015 9:21 am

Report on NTFS Permissions

Post by jhicks »

Josh, when you connect locally using WBEMTest do you get any errors? Are errors only when running a query? Does it affect other classes as well? Can you remotely query this class using WBEMTest from another machine? You may have to turn on debug logging to get more details.Did WMI ever work on this box?
User avatar
goldyfarbs
Posts: 239
Last visit: Thu Mar 07, 2013 8:15 am

Report on NTFS Permissions

Post by goldyfarbs »

JV..

Nice I am having fun with this stuff.... Too bad I can't nail it.. I wish I had the skills to build a winform that would associate it and do everything.. Would be sweet..
This topic is 15 years and 7 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked