+ Reply to Thread
Results 1 to 3 of 3
  1. Senior Member
    Join Date
    Jan 2006
    Location
    Souhampton Uk
    Posts
    1,110

    Certifications
    Currently Studying for MCDST
    #1

    Default Guild of Microsoft a basic Question regarding Powershell

    Howdy Guys.

    I am looking at some Powershell stuff, I have been watching CBT nuggets videos by Don Jones. Figured I would attempt to build a solid foundation before I tackle some scripting. I primarily run Linux so making the transition has been a bit eventful shall we say. Dear guild of Microsoft I propose the following.

    I am struggling to understand and get to grips with syntax, This has always been a weakness for me including Linux so I figured you guys could break things down and cement concepts so that I can take notes and keep a reference.

    So here we go:

    If I run the following: get-help get-eventlog | more

    I am struggling to understand syntax and order of operation what the brackets mean etc. like what does [] <> [[] mean? I kinda understand some parts. However I could really do with some guidance in cementing these concepts.

    Get-EventLog [-LogName] <String> [[-InstanceId] <Int64[]>] [-After <DateTime>] [-AsBaseObject] [-Before <DateTime>] [-ComputerName <String[]>] [-EntryType
    <String[]> {Error | Information | FailureAudit | SuccessAudit | Warning}] [-Index <Int32[]>] [-Message <String>] [-Newest <Int32>] [-Source <String[]>] [-User
    <String[]>] [<CommonParameters>]


    Go easy on me guys I need to be spoon fed break it down in a really noob friendly way


    As always I appreciate all the guidance from this wonderful forum.
    Last edited by ally_uk; 08-26-2017 at 12:01 AM. Reason: change
    Microsoft's strategy to conquer the I.T industry

    " Embrace, evolve, extinguish "
    Reply With Quote Quote  

  2. SS -->
  3. Senior Member 636-555-3226's Avatar
    Join Date
    Jul 2015
    Posts
    881

    Certifications
    Lots of security certifications, yet the more I learn, the further I have to go...
    #2
    My coworkers and I found a lot of value in the "PowerShell in a month of lunches" series. Not 100% perfect, but a great resource for learning, and relatively cheap

    https://www.amazon.com/s/ref=nb_sb_s...nth+of+lunches
    Reply With Quote Quote  

  4. Self-Described Huguenot blargoe's Avatar
    Join Date
    Nov 2005
    Location
    NC
    Posts
    4,099

    Certifications
    VCAP5-DCA; VCP 3/4/5/6 (DCV); EMCSA:CLARiiON; Linux+; MCSE:M 2000/2003; MCSE:S 2000/2003; MCTS:Exch2007; Security+; A+; CCNA (expired)
    #3
    Quote Originally Posted by ally_uk View Post
    Howdy Guys.

    I am looking at some Powershell stuff, I have been watching CBT nuggets videos by Don Jones. Figured I would attempt to build a solid foundation before I tackle some scripting. I primarily run Linux so making the transition has been a bit eventful shall we say. Dear guild of Microsoft I propose the following.

    I am struggling to understand and get to grips with syntax, This has always been a weakness for me including Linux so I figured you guys could break things down and cement concepts so that I can take notes and keep a reference.

    So here we go:

    If I run the following: get-help get-eventlog | more

    I am struggling to understand syntax and order of operation what the brackets mean etc. like what does [] <> [[] mean? I kinda understand some parts. However I could really do with some guidance in cementing these concepts.

    Get-EventLog [-LogName] <String> [[-InstanceId] <Int64[]>] [-After <DateTime>] [-AsBaseObject] [-Before <DateTime>] [-ComputerName <String[]>] [-EntryType
    <String[]> {Error | Information | FailureAudit | SuccessAudit | Warning}] [-Index <Int32[]>] [-Message <String>] [-Newest <Int32>] [-Source <String[]>] [-User
    <String[]>] [<CommonParameters>]


    Go easy on me guys I need to be spoon fed break it down in a really noob friendly way


    As always I appreciate all the guidance from this wonderful forum.
    From your above example:

    [[-InstanceId] <Int64[]>] indicates that the -InstanceId parameter is optional. The parameter is type Int64, the [] means that it accepts multiple Int64 values.

    For Instance, get-eventlog application -InstanceId 1,2
    IT guy since 12/00

    Recent: 10/27/2017 - Passed Microsoft 70-410 (one exam left for MCSA 2012)
    Working on: MCSA 2012 upgrade from 2003 (to heck with 2008!!), MCSA 2016 upgrade, more Linux
    Thinking about: VCP6-CMA, AWS Solution Architect (Associate), Python, VCAP6-DCD (for completing VCIX)
    Reply With Quote Quote  

+ Reply to Thread

Social Networking & Bookmarks