header1   header
header
header : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
IMPORTANT: PowerShellCommunity.org is moving! - Wednesday, August 15, 2012

PowerShellCommunity.org is moving!  This community software, and the hardware that it sits on, are no longer serving the purposes of this community.  As a result, we have decided to move this community to a new home at PowerShell.org.  PowerShell.org is already up and running with the new community software and in its new location, so please post any new questions that you have on the forums over there instead of posting them on this site.  We've already started getting some great questions from members of the community over there so please, come on over and join us!

While we are going through this transition, this site will remain up for the short term.  New posts may no longer be created on these forums, however replies to existing posts are allowed so that users who posted questions don't have to re-post the same question on the new site.

[UPDATE 28/02/2013] New user registration has been disabled and forums have now been switched to read-only, including for existing posts since all threads that were started should now be completed. If you have a question about content on this site or about PowerShell in general, head over to PowerShell.org and ask it there where there are people actively using the site and answering questions.

If you have any questions, please let us know on the PowerShell.org site.

Thank you,

Kirk "Poshoholic" Munro

 
What error am I making?
Last Post 16 Jan 2012 01:39 PM by Bruce Meyer. 2 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Not Resolved
Bruce MeyerUser is Offline
New Member
New Member
Posts:4
Avatar

--
16 Jan 2012 07:03 AM
    I tried this (PS2) as both a restricted user and administrator and I get the same results.
    I am using Win 7 with Powershell 2.0.

    When I view with RegEdit the key and it's default value of '1' exist.
    Using fsutil, it exists with it's default value:

    C:\windows\system32>fsutil behavior query DisableLastAccess
    DisableLastAccess = 1

    If I use Powershell to query:

    Get-ItemProperty HKLM:\System\CurrentControlSet\Control\FileSystem\

    I get the full list of subkeys and values:

    PSPath                                : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet
                                            \Control\FileSystem\
    PSParentPath                          : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet
                                            \Control
    PSChildName                           : FileSystem
    PSDrive                               : HKLM
    PSProvider                            : Microsoft.PowerShell.Core\Registry
    DisableDeleteNotification             : 0
    SymlinkLocalToLocalEvaluation         : 1
    SymlinkLocalToRemoteEvaluation        : 1
    SymlinkRemoteToLocalEvaluation        : 0
    SymlinkRemoteToRemoteEvaluation       : 0
    Win31FileSystem                       : 0
    Win95TruncatedExtensions              : 1
    NtfsAllowExtendedCharacter8dot3Rename : 0
    NtfsBugcheckOnCorrupt                 : 0
    NtfsDisable8dot3NameCreation          : 2
    NtfsDisableCompression                : 0
    NtfsDisableEncryption                 : 0
    NtfsDisableLastAccessUpdate           : 1
    NtfsDisableVolsnapHints               : 2
    NtfsEncryptPagingFile                 : 0
    NtfsMemoryUsage                       : 0
    NtfsMftZoneReservation                : 0
    NtfsQuotaNotifyRate                   : 3600
    UdfsCloseSessionOnEject               : 3
    UdfsSoftwareDefectManagement          : 0

    which includes the single subkey I am interested in:
    NtfsDisableLastAccessUpdate           : 1

    When I try to query just that subkey, the response is as if it doesn't exist:

    PS C:\windows\system32> Get-ItemProperty HKLM:\System\CurrentControlSet\Control\FileSystem\NtfsDisablelastAccessUpdate

    Get-ItemProperty : Cannot find path 'HKLM:\System\CurrentControlSet\Control\FileSystem\NtfsDisablelastAccessUpdate' bec
    ause it does not exist.
    At line:1 char:17
    + Get-ItemProperty <<<<  HKLM:\System\CurrentControlSet\Control\FileSystem\NtfsDisablelastAccessUpdate
    + CategoryInfo          : ObjectNotFound: (HKLM:\System\Cu...astAccessUpdate:String) [Get-ItemProperty], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetItemPropertyCommand


    I will be grateful to learn where the error in my attempt is.

    Thank-you,
     --Bruce D. Meyer



    Marco ShawUser is Offline
    Veteran Member
    Veteran Member
    Posts:1684
    Avatar

    --
    16 Jan 2012 07:11 AM
    Like this:
    Get-ItemProperty -path HKLM:\System\CurrentControlSet\Control\FileSystem -name NtfsDisablelastAccessUpdate
    Bruce MeyerUser is Offline
    New Member
    New Member
    Posts:4
    Avatar

    --
    16 Jan 2012 01:39 PM
    Thank-you Marco,
    It looks like I need to read up on the syntax.
    --Bruce
    You are not authorized to post a reply.


    Active Forums 4.3
    right
    footer   footer
    footer Many thanks to our original sponsors: Quest Software • SAPIEN Technologies • Compellent • Microsoft footer
    footer   footer