Script to output MAC to CSV
Hi, I have what I believe to be a very simple problem. I have CSV that I am trying to maintain and update via powershell. The CSV is already created, so I just need to add to it. The path is...
View ArticleMigrating User Profiles & Resetting Permissions [Windows Server]
I would love some feedback on this if possible, i have a write up on the blog post with some reasoning for this script....
View Articlehelp iterating over a string
This works perfectly in ISE, but not a normal PS session – even as administrator. $msg = "TEST" $msg = $msg.toCharArray() foreach ($letter in $msg) { write-host "This is the letter " $letter } It...
View ArticleProblem with character coding when exported to clipboard.
As part of my PowerShell profile I have a function that creates passwords. To help readability I have only a certain set of characters that the password must come from – but that is probably not of...
View Article[Question] Does this script securely authenticate a user’s credentials with AD?
I’m trying to force user’s to log in and verify their identity before being able to access a script. Just checking for a domain account isn’t sufficient, I want to essentially implement LDAP...
View ArticleAssist with Error Handling
Hello all – I’m somewhat fresh to powershell scripting, at least for things more than one or two lines. I have a script I’ve been working on that uses a number of instances of get-wmiobject to connect...
View Articleread password from encrypted file
Hi Guys, i’ve got a Script that uses credentials from an other user to create a file on a network storage. At the Moment the password of the user is stored in plaintext inside the script. I’d like to...
View Articletrying to get every pc in the office’s Computer model, user, and serial number.
this is what im trying to work with. sorry if the answer is simple, i’m new to powershell. $computers = Get-Content -path C:chi_desktops2.txt $log = -path “c:laptop_log.txt” foreach($computer in...
View ArticleDo something 10 times, or until a command succeeds.
So here’s my issue. I am trying to move a user to a new OU in Active Directory. I want to make sure that the user moves successfully before moving on in the script. Here’s the logic I came up with:...
View ArticleRunning Module on remote machine
Hi, I’m trying to invoke a module to run on a hundreds of remote servers. The plan is I want to kick-off Windows Update on them at once. I have the PSWindowsUpdate module, but the Invoke-WUInstall...
View ArticleLearning PS, Workflow, Output to File
Hello! In my new position at work, I’ve been learning powershell to automate various things. I’ve been tweaking this one script that I created, but I am running into issues. The Purpose: To scan a...
View ArticleEncrypted PGP Passphrase
Can anyone help me on this? I’m trying to store the pgppassphrase in an encrypted text file. I encrypt the file like this. $pgppassphrase="Password123" $pgppassphrase | ConvertTo-SecureString...
View ArticleI want a custom New-ADComputer but what do I call it? (Namespacing question)
I thought about prefixing all my cmdlets that override originals with “My” or the company initials but… I… don’t… like that. PS> MyNew-ADComputer PS> ABCNew-ADComputer Though I haven’t tried it...
View ArticleUsing powershell to rename files.
Hi there. I’m moving my Plex library from my main desktop to my QNAP NAS. All of the files that needed to be trans-coded has been trans-coded but I am in a predicament. So I need to get powershell to...
View ArticleLearning Powershell – Question about Formatting my results
I was working on setting up a little script that will let me get information on what monitors a workstation has connected to it. I can get the results I want, but the formatting is a little odd. If a...
View ArticleCreating new users from SQL server changes?
Maybe I am looking at this the wrong way, not having much luck finding an answer. Currently HR inputs new users/terminations into their excel document, and manually email out the changes. I can then...
View ArticleCan someone explain UTC offset to me (x-post r/sysadmin)
Doing some troubleshooting on a device located in E/T and I checked last boot via wmic. I understand the first part of the string (date/time) but can’t figure out the part after the decimal (see...
View ArticleAD User Creation Date
Is there a script I can use to get the date a user account was created? It’s in a separate domain so I’m unable to use Quest in that environment. submitted by /u/404AikNotFound [link] [comments] The...
View ArticleDynamic Parameter Help
I could use some help on a script that I am building for work. I have removed bunch of stuff an have edited because its work related. This is my first script trying to use Dynamic Parameters. The...
View Articlelooking for some help on a script
So I am looking to make a script that when a user runs it they can select from a list of network printers and have that printer they selected added to their profile. Any ideas how to go about this?...
View Article