Тёмный
No video :(

PowerShell Master Class - Data and Objects 

John Savill's Technical Training
Подписаться 277 тыс.
Просмотров 26 тыс.
50% 1

This module dives into credentials, parsing data and working with objects.
This is a multi-part class that should be viewed as part of its playlist, • PowerShell Master Class
Materials for the class available at github.com/johnthebrit/PowerS...
00:00 Introduction
00:10 Storing credentials
03:08 Storing an encrypted version
05:43 Using Azure Key Vault
13:02 Certificate authentication
13:57 Variable types
14:25 Casting
18:03 Fun with strings
23:35 Variable scope
27:28 Variables with Invoke-Command
29:23 Using $using
30:23 Hash tables
32:38 Using PSObject
36:15 Foreach-Object
39:56 ForEach and ForEach-Object
43:27 Getting property values
45:53 Coming up next

Опубликовано:

 

6 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 35   
@chrismcgourty1756
@chrismcgourty1756 3 года назад
Knew a lot of this but held on with it because the quirks you showed were great. You've got a great style to explaining. Thanks John.
@NTFAQGuy
@NTFAQGuy 3 года назад
Thank you, glad it was useful
@richard1101
@richard1101 3 месяца назад
Awesome - Big thank you!
@BezKomentare
@BezKomentare 5 лет назад
Excellent video. Thanks!!
@mrtechstawk
@mrtechstawk 3 года назад
Excellent as always
@NTFAQGuy
@NTFAQGuy 3 года назад
Thank you! Very kind.
@imperialdrive
@imperialdrive 2 года назад
I'm going to echo the other comments but still had to share my 'much wow' sentiment towards you. Fantastic content! Thank you for being so generous with your time, effort, and knowledge/wisdom. It is very much appreciated and I aim to play it forward. Cheers from LA/SF.
@NTFAQGuy
@NTFAQGuy 2 года назад
Glad you enjoyed it! Thanks for the note!
@NickRoman
@NickRoman Год назад
Wow, I didn't ever think about using expandproperty that way or didn't know. Forever, I've been putting () around the object like (command).property to get just the property out. Of course, you can also do that with any command that outputs an object without having to use the | select. But, I appreciate knowing both ways.
@iamdedlok
@iamdedlok 3 года назад
Great vid again John! Loved the treatise on hashtable to objects. I will try to use more PSObjects going fwd. Didn't know you could so easily cast a hashtable to a PSObject! A trick I have found useful when examining what's in the content of complex objects when returned from some other call, is doing a ConvertTo-Json on the returned object. Example ... If I want to find out which property lets me see NetworkInterface ids of VMs in Azure.. Doing a ConvertTo-JSON(Get-AzVm) -Depth 3 .. lets me see it where that property is hiding. Powershell is so powerful ;-) I am trying to learn Bash too, but keep coming back to PowerShell as it feels so much easier and natural to work with. Now only I need to convince my client to install PowershellCore in DevOps pipeline tasks so that I can write powershell as tasks.lol.
@geroffmilan3328
@geroffmilan3328 Год назад
12:25 really glad you covered this, Jon: this is just moving the problem sideways in many cases. My background is penetration testing, so breaking more than making 😏 but the use case for this approach seems to be: when you *can* use an MSI to execute your script, but the target resource does not support using an MSI for access. Or perhaps just where you are running interactively as a given identity, which can be granted access to a Key Vault, but cannot be granted access to one ore more of those target resources.
@ibrahimabdeltawab6418
@ibrahimabdeltawab6418 Год назад
Super! Thanks so much
@henrywycislo9454
@henrywycislo9454 3 года назад
Very descriptive video.. Excellent work
@NTFAQGuy
@NTFAQGuy 3 года назад
Thank you
@lightyagami0ben
@lightyagami0ben 4 года назад
really good stuff !!
@NTFAQGuy
@NTFAQGuy 4 года назад
Thank you!
@matrixview
@matrixview 5 лет назад
@John Savill: Thank you so much for creating and posting these great course videos! I love PowerShell, and always looking to learn something new. Hopefully you will also dive into API's, web scraping and html-parsing (which is quite difficult with with PS Core 6.x). How to use Selenium/PhantomJS in PS; or Lucene in PS; meta/proxy-programming (ie. wrapping cmdlets and executables); creating DSL's with PS and LINQ in PS would also be great (specialized) courses. That would be pretty advanced stuff, but that's what interests me... and there aren't many (if any) PS courses yet for that.
@t0ffluss
@t0ffluss 4 года назад
20:40 - So we're not going to talk about John going to the gym for 6 hours at 3AM? :D
@NTFAQGuy
@NTFAQGuy 4 года назад
Lol, ironman training :)
@t0ffluss
@t0ffluss 4 года назад
@@NTFAQGuy #machine ;D
@iamdedlok
@iamdedlok 3 года назад
Not surprised. He's a beast. The godly kind.
@darthVikes
@darthVikes 5 лет назад
It would be nice to include what each section is in the RU-vid Description section and add times for reference back to the specific section/topics?
@NTFAQGuy
@NTFAQGuy 5 лет назад
That's a good idea. I was focused on getting everything recorded but now I'm done I'll try and go back through and add more detail with the timings like you say. Thanks!
@nitti3723
@nitti3723 2 года назад
So are $global:x, $script:y, $private:z the only way to manually specify what scope I want a variable to use?
@NTFAQGuy
@NTFAQGuy 2 года назад
Those are typical scope modifiers. Read the docs on scope of looking for more
@manikantaguthula5711
@manikantaguthula5711 3 года назад
$username =(Get-AzKeyVaultSecret -VaultName -Name samplepassword).SecretValueText isn't supporting now @John
@NTFAQGuy
@NTFAQGuy 3 года назад
they change things. docs has a new example. docs.microsoft.com/en-us/azure/key-vault/secrets/quick-create-powershell
@manikantaguthula5711
@manikantaguthula5711 3 года назад
@@NTFAQGuy Okay sir, thank you very much
@varek9
@varek9 5 лет назад
@John Savill Hello John, I really appreciate your videos, i have learned a lot through them. i have just one question about the credential store. maybe i understood it the wrong way. If you store your password encrypted in a file like this: "P@ssword1" | ConvertTo-SecureString -AsPlainText -Force | ConvertFrom-SecureString | out-file C:\admin\pw.txt If i do the line above, i get a file with the encrypted Password. I can import the password like this: $pass = Get-Content "C:\admin\pw.txt" | ConvertTo-SecureString The thing is, i can only import the password with user i created the file. so it is only working in the usercontext. That means storing the password in a file is still a safe way, am i right? Best Regards
@NTFAQGuy
@NTFAQGuy 5 лет назад
Anyone with rights on the file would be able to get the content so its really not that secure but better than nothing.
@jano.5485
@jano.5485 Год назад
Yes I think working with just native Windows capabilities, the Data Protection API (DPAPI) is the safest way to store a credentials since it can only be decrypted by the user who encrypted it and also only on the machine which it was encrypted on.
@issiewizzie
@issiewizzie 5 лет назад
I feel ashamed I should have learnt Powershell 5 years ago.... A better time to start I guess. As for passwords credential in code ... one of our devs followed this bad practice last year.
@NTFAQGuy
@NTFAQGuy 5 лет назад
It happens a lot :-)