PowerShell Tutorials : Generating Random Passwords
ฝัง
- เผยแพร่เมื่อ 29 พ.ย. 2024
- In this video, learn how to generate random passwords with powershell and be able to use the code in your own scripts!
Twitch: / jackedprogrammer
Tags:
PowerShell
GUI
Programming
Scripting
Automating
JackedProgrammer
Coding
The issue has to do with variable scope and your declarations. You are not declaring and initializing the variables which means the variables are not in scope when the 'if' statement is false. So the variables are picking up what was previously stored in those arrays memory when you were testing. Always declare/initialize variables to the scope they are being used. Hence, this is why you had to initialize the variables to null preceding the 'if' blocks because that is the same scope of the code that proceeds the 'if' blocks where you are adding the variable arrays together.
Dude just found your channel and I'm hyped!! I've been building a wrapper around the aws cli for our dev teams and have been using powershell because we all work on windows machines, so literally no additional installs, permissions or admin rights in order to work out of the repo. Powershell is so badass!
Great video as always, hated having to give out a password containing a '~' lol,
Appreciate the effort 👌
Thanks for the video, great pacing, useful concepts explained as you build the function.
i get an error when i intialize those variables with $null what could cause that? i'm talkining about the sets