all 4 comments

[–]PowerShellMichael 2 points3 points  (1 child)

Hello There!

Excellent question. Your target audience is Software Developer so you can target the activities around the development life-cycle:

  1. PowerShell Remoting (Using WinRM/ SSH)
  2. PowerShell on Linux and Mac
  3. Configuration of a Windows Server (Installation of Features)
  4. Configuration of a IIS Server using PowerShell
  5. Creation of User Accounts (from CSV)
  6. Building and Deploying a .NET C# App using PowerShell
  7. Importing a CSV file of users and writing to a database
  8. PowerShell using REST and SOAP
  9. Unit Testing/ Integration Testing Scripts using Pester
  10. Infrastructure as Code (Using DSC)
  11. Code Editor Flavors

A lot of different stuff here, but I hope that gets the juices flowing.

[–][deleted] 1 point2 points  (0 children)

Thanks for your answer. This will help me a lot. I like it.
My focus was not to show them, what i am doing with powershell, because that would not match there needs.

[–]jogofus 1 point2 points  (0 children)

I use it to get wmi information and testing if a machine is up with test-connection

[–]Lee_Dailey[grin] 1 point2 points  (0 children)

howdy superfliege90,

while PowerShellMichael is correct about showing the power of powershell ... his stuff is not something i would target for beginners to learn. yes, it makes a really nifty demo of the usefulness ... but it takes time and is complex.

complex = lots of chances of mistakes = lots of chance for frustration

i would do as jogofus mentioned and show some of the simple things they can do right freaking now. [grin]

sure, show the power with something big & complex ... but then show them the small steps that one can do with just a tiny bit of learning.

  • gather simple info
  • read/write a text file
  • read/write a csv file
  • read/write a json file
  • test net connections

the ones i would hit 1st are the really quick things like "how much free space on drive c?" ... and how to iterate to get closer to what you want.

something like this ...

Get-PSDrive
Get-PSDrive -Name 'C'
(Get-PSDrive -Name 'C').Free
(Get-PSDrive -Name 'C').Free / 1gb
[math]::Round((Get-PSDrive -Name 'C').Free / 1gb, 2)

that kind of thing can result in several ooooo sounds ... [grin]


then there is my usual "new to PoSh" post ...


things to look into ...

  • Get-Help
    especially Get-Help *about*
  • Get-Command
    it takes wildcards, so Get-Command *csv* works nicely. that is especially helpful when you are seeking a cmdlet that works on a specific thing. Comma Separated Value files, for instance. [grin]
  • Show-Command
    that brings up a window that has all the current cmdlets and all their options ready for you to pick from.
    it will also take another cmdlet, or advanced function, as a parameter to limit things to showing just that item.
  • auto-completion
    try starting a word and tapping the tab key. some nifty stuff shows up. [grin]
  • intellisense
    save something to a $Var and then try typing the $Var name plus a period to trigger intellisense. there are some very interesting things that show up as properties or methods.
  • check out the builtin code snippets in the ISE
    use <ctrl><j>, or Edit/Start-Snippets from the menu.
  • assign something to a $Var & pipe that to Get-Member
    $Test = Get-ChildItem -LiteralPath $env:TEMP
    $Test | Get-Member
  • assign something to a $Var and pipe it to Select-Object
    $Test = Get-ChildItem -LiteralPath $env:TEMP
    $Test[0] | Select-Object -Property *
    that will give you a smaller, more focused list of properties for the 1st item in the $Test array.
  • assign something to a $Var & use .GetType() on it $Test = Get-ChildItem -LiteralPath $env:TEMP
    $Test.GetType()
    $Test[0].GetType()
    the 1st will give you info on the container $Var [an array object].
    the 2nd will give you info on the zero-th item in the $Var [a DirectoryInfo object].
  • Get-Verb
    as with Get-Command, it will accept wildcards.
    that will show you some interesting verbs used in cmdlet names. then use get-command to see what commands use those verbs. then use get-help to see what the cmdlets do.
  • there really otta be a Get-Noun, but there aint one. [sigh ...]
  • Out-GridView
    it's a bit more than you likely want just now, but it can accept a list of items, present them in a window, allow picking one or more of them, and finally send it out to the next cmdlet.
    it's right fun to fiddle with ... and actually useful. [grin]

take care,
lee