Tag : powershell

all, I am working on a script to bulk create local users which works fine except for the password creation portion. The script pulls the information from a csv, but when I test the account with the password I think it should be using, it fails. I sense it is due to the special characters not being parsed. Here is a sample password I have in the csv password column.
Passw0rdforSDSSc1entist$2024
I tried with single quotes ‘Passw0rdforSDSSc1entist$2024’ and double quotes “Passw0rdforSDSSc1entist$2024”, as well as putting the escape () before the $, Passw0rdforSDSSc1entist$2024 but still does not..

Read more

So I tried to create a function that will look for my external drives by FriendlyName and if drive is plugged in to my PC I add it to the array list as a PATH with drive letter (“X:”) so I can use it later for copying as a destination path. If external drive is not available then it will not be added. So If I have 3 ssds pluged I will have array with 3 paths returned, if only 2.. only 2 paths, 1 o..

Read more

$formFields = @(“UserSurname”,”UserFirstName”) foreach ( $field in $formFields ) { $($field+”Label”) = New-Object system.Windows.Forms.Label $($field+”Label”).Width = 25 } I’m trying to initialize a bunch of form items from a string of components. I just don’t understand how to initialize a variable from another value in a loop. I have tried many things but I think ..

Read more