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

    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-25-2017 at 11:01 PM. 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
    935

    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,139

    Certifications
    VCAP5-DCA; VCP 3/4/5/6 (DCV); MCSA 2016/2012/2K3/2K; MCSE:S 2K3/2K; MCSE:M 2K3/2K; MCTS:Exch2K7; EMCSA:CLARiiON; Linux+; Security+; A+
    #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: 1/29/2018 - Passed 70-743 - MCSA 2016 Complete; 1/13/2018 - Passed 70-411 - MCSA 2012 complete
    Working on: Being a better coder, build/test/deploy automation fundamentals
    Future: Renew VCP (due 2/2019), possibly with an adjacent VCP or VCAP
    Reply With Quote Quote  

+ Reply to Thread

Social Networking & Bookmarks