ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Quick List of Useful Powershell Commands

    IT Discussion
    powershell
    3
    7
    400
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • wirestyle22W
      wirestyle22
      last edited by wirestyle22

      I have created an internal wiki for my company and I am trying to create useful documentation for anyone who is a server administrator currently.

      What commands do you use on at least a weekly basis that you think should be added to it? What I have so far:

      • Active Directory/Local user creation and deletion

      • Group Management AD/Local

      • Searching for and Deleting specific e-mail from the EMC

      • Mailbox usage statistics

      • Finding files

      etc.

      I am not extremely proficient in Powershell so I figured I would ask for your help

      1 Reply Last reply Reply Quote 1
      • EddieJenningsE
        EddieJennings
        last edited by

        Not specifically on your list, but I find myself using these often.

        Get-ADUser -Filter { name -like "*foo*" } -- for finding user names

        Get-ADUser -Identity SomeUserName -Properties * | fl *PartOfAPropertyName* -- I can never remember the exact name of the property sometimes, so this is helpful. Also, the -Properties * is often needed, because Get-ADUser only returns a few properties by default.

        Get-ADGroupMember -Identity SomeGroupName | Select Name,SamAccountName -- for getting a quick list of group members when people need them.

        Get-ADPrincipalGroupMembership -Identity SomeUserName | Select Name,SamAccountName -- learned this from my supervisor. Useful for seeing all the groups in which a user is a member.

        For the last two, I select those two properties, as they're usually what I need. Just running the cmdlets without piping to select will usually return way more than you want.

        1 Reply Last reply Reply Quote 1
        • IRJI
          IRJ
          last edited by

          The best way to learn is by forcing yourself to do everything on powershell. It might be a little slower at first, but once you really get it you can remember alot of commands and use help much more effectively for stuff you don't have memorized.

          wirestyle22W 1 Reply Last reply Reply Quote 4
          • wirestyle22W
            wirestyle22 @IRJ
            last edited by

            @IRJ Every day is like 12 hours of work in an 8 hour day and that's when I don't have random things thrown at me. I am working on the weekend but it's mostly in Linux. May need to make time

            IRJI 1 Reply Last reply Reply Quote 0
            • IRJI
              IRJ @wirestyle22
              last edited by

              @wirestyle22 said in Quick List of Useful Powershell Commands:

              @IRJ Every day is like 12 hours of work in an 8 hour day and that's when I don't have random things thrown at me. I am working on the weekend but it's mostly in Linux. May need to make time

              You could probably feel comfortable with it in a week if you used it for everything. It is quite amazing how much you can feel lost with something one day and the next day you 100% get it. This happens alot and learning isn't always linear. There is generally a break through period.

              wirestyle22W 1 Reply Last reply Reply Quote 3
              • wirestyle22W
                wirestyle22 @IRJ
                last edited by wirestyle22

                @IRJ said in Quick List of Useful Powershell Commands:

                @wirestyle22 said in Quick List of Useful Powershell Commands:

                @IRJ Every day is like 12 hours of work in an 8 hour day and that's when I don't have random things thrown at me. I am working on the weekend but it's mostly in Linux. May need to make time

                You could probably feel comfortable with it in a week if you used it for everything. It is quite amazing how much you can feel lost with something one day and the next day you 100% get it. This happens alot and learning isn't always linear. There is generally a break through period.

                Yeah I just don't have the time. Everything has to be fixed immediately here. There is no room for it unfortunately. I'm going to go through the book @Dashrender and I both purchased called Learn Powershell in a Month of Lunches

                EddieJenningsE 1 Reply Last reply Reply Quote 0
                • EddieJenningsE
                  EddieJennings @wirestyle22
                  last edited by

                  @wirestyle22 said in Quick List of Useful Powershell Commands:

                  @IRJ said in Quick List of Useful Powershell Commands:

                  @wirestyle22 said in Quick List of Useful Powershell Commands:

                  @IRJ Every day is like 12 hours of work in an 8 hour day and that's when I don't have random things thrown at me. I am working on the weekend but it's mostly in Linux. May need to make time

                  You could probably feel comfortable with it in a week if you used it for everything. It is quite amazing how much you can feel lost with something one day and the next day you 100% get it. This happens alot and learning isn't always linear. There is generally a break through period.

                  Yeah I just don't have the time. Everything has to be fixed immediately here. There is no room for it unfortunately. I'm going to go through the book @Dashrender and I both purchased called Learn Powershell in a Month of Lunches

                  You learn stuff one bite at a time. My PowerShell chops are much better after a year at my current gig. And they improved doing one task at a time. Like that cmdlet I posted for finding user names. I did that enough to where I started to understand exactly what I'm telling the cmdlet to do, which leads to learning other cmdlets and such quicker.

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  • First post
                    Last post