set-alias get-eventlog

Welcome Forums General PowerShell Q&A set-alias get-eventlog

This topic contains 6 replies, has 3 voices, and was last updated by

 
Participant
1 year, 3 months ago.

  • Author
    Posts
  • #78265

    Participant
    Points: 36
    Rank: Member

    Hello,

    This is my first post so please be understanding with this simple question from a novice.

    I was testing the set-alias commandlet, and think I've now screwed up a commandlet which doesn't work with either the full commandlet name or the alias I tried to assign it.

    I ran the following:

    set-alias get-eventlog el

    I think that I should have written this:

    set-alias el get-eventlog

    Is that correct?

    Unfortunately, I can not run get-eventlog anymore. How can I reset get-eventlog?

    Any assistance is much appreciated.

    Regards, Darren

  • #78271

    Participant
    Points: 262
    Helping Hand
    Rank: Contributor

    It should be enough when you start a new console window. Aliasses will not be saved automaticly.

    • #78274

      Participant
      Points: 36
      Rank: Member

      Thank you Olaf for the quick response.

      I suppose my next question is – how do I create an alias that will persist?

    • #78278

      Participant
      Points: 262
      Helping Hand
      Rank: Contributor

      You could use a Powershell profile.

      Get-Help about_profiles

      I'd rather use tab completion instead of a lot of aliasses or abbreviations.

    • #78284

      Participant
      Points: 36
      Rank: Member

      Thanks again Olaf 🙂

  • #78275

    Participant
    Points: 34
    Rank: Member
  • #78286

    Participant
    Points: 36
    Rank: Member

    Thank you Simon 🙂

The topic ‘set-alias get-eventlog’ is closed to new replies.