Set-location example on Page 59 of book

Welcome Forums General PowerShell Q&A Set-location example on Page 59 of book

This topic contains 1 reply, has 2 voices, and was last updated by

 
Participant
9 months, 2 weeks ago.

  • Author
    Posts
  • #101637

    Participant
    Points: 370
    Rank: Contributor

    Sir/Madam,

    I am learning PS from the Book by Jones and Hicks (PS in a month of lunches, 3rd ed.).
    On page 59, I followed the example to set-location as follows:
    > set-location -path hkcu
    and got the error message that "C:\hkcu" does not exist, which is true.
    I must be missing some simple setting, configuration, or ??? I have Windows 7, PS 5.1.
    Any tips, advice or hints would be appreciated.
    — SORRY SORRY — PLEASE IGNORE THIS POST:
    I found out my mistake: I forgot the colon ':' in 'hkcu:'

    Sincerely,
    RTan

  • #101653

    Participant
    Points: 1,077
    Helping Hand
    Rank: Community Hero

    If you like to change the provider as well when changing the location you have to make obvious that it is another drive or provider ... like so

    Set-Location -Path hkcu:

    or provide the provider as well with the path like this:

    Set-Location REGISTRY::HKCU

The topic ‘Set-location example on Page 59 of book’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort