Windows 11 on work laptop can't install RSAT
Reddit » PowerShell
by /u/Radqr
7h ago
Hello, I am currently running into an issue at work where I cannot install RSAT on my computer, can you help me. I ran the command, "Get-WindowsCapability -Name RSAT* -Online | Select-Object -Property DisplayName, State" on cmd and it didn't work so I tried to use settings and nothing comes up. Has anyone had this issue and how did you fix it? submitted by /u/Radqr [visit reddit] [comments ..read more
Visit website
GUI with parameters?
Reddit » PowerShell
by /u/DarthOpossum
7h ago
Powershell-script-menu-gui looks like the perfect tool for quickly loading up scripts with hardcoded options… or scripts having logic to collect data like a grid view popup. I have a ton of scripts that require 1+ servers to be chosen and then a bunch more that require 1-2 params. Anything similar but allowing for params? If not, it’s easy enough to create a hardcoded winforms to hardcode textboxes to a few scripts, I just didn’t want to do a lame job reinventing the wheel submitted by /u/DarthOpossum [visit reddit] [comments ..read more
Visit website
Why am I getting access denied when searching CSV files?
Reddit » PowerShell
by /u/Mvalpreda
7h ago
I have some very basic code I use to search CSV audit files for specific strings. I'll copy the files from the device to c:\1 on my machine and then run this to search for 'STRING' in the 'path/from' column Get-ChildItem 'C:\1' -Recurse | ForEach-Object { Import-Csv $_.FullName | Where-Object { $_.'path/from' -like '*STRING*' } } | Export-Csv 'C:\1\branded.csv' -NoTypeInformation Keep getting this though Import-Csv : Access to the path 'C:\1\20240327' is denied. At line:2 char:3 + Import-Csv $_.FullName | Where-Object { $_.'path/from' -like '*/DEP ... + ~~~~~~~~~~~~~~~~~~~~~~ + CategoryIn ..read more
Visit website
SharePoint Online Document Library folder creation
Reddit » PowerShell
by /u/SublimeApathy
7h ago
So maybe I'm just not asking google the right questions but I'm having a hard time finding the cmdlet I'm looking for. I have multiple teams sites that I need to add folders to their document libraries. For the life of me I can't seem to find the cmdlet I'm looking for to do this in powershell. I've encountered boat loads of "How to do this with Add-PnPFolder" but I'm a little sketched out about the untrusted repository I have to accept in order to use it and I literally don't have the time to research security around it. Surely there is a regular ass PowerShell cmdlet to create a folder in a ..read more
Visit website
Powershell & Web
Reddit » PowerShell
by /u/Bc0nn0r98
7h ago
Apologies if this is a dumb question. Can I use PowerShell to extract and use data from a web system/web database? E.g. extract device info from Ivanti. How would i do this? submitted by /u/Bc0nn0r98 [visit reddit] [comments ..read more
Visit website
Programmatic update of Windows Update history GUI when patching servers using PowerShell
Reddit » PowerShell
by /u/Just-A-NewUser
7h ago
Good evening everyone. :) We use the following approach for patching Windows Servers, using PowerShell: https://devblogs.microsoft.com/scripting/hey-scripting-guy-how-can-i-search-for-download-and-install-an-update/ It works very well, but, I think, starting Windows Server 2019, it was noticed, that in "Update History" section of "Update & Security" recently installed updates are not shown, when script is used to perform the installation. If programmatically download updates and then press "Install now" manually, then it's fine. Does anyone know-is it possible to reflect recently installe ..read more
Visit website
Script to balance AD group membership.
Reddit » PowerShell
by /u/Jaredcm1
7h ago
A team has a oddball app that requires computers be added to an AD group, but there is a maximum number of computers that can be in each group. So computers are divided between several AD groups. This is a huge maintenance headache for both the help desk who adds them initially, and the team that is ultimately responsible for it. They have requested a script that they can run to manage this, but I've been having a hard time finding the logic required to pull it off. Basically it needs to take an inventory of several groups, and then distribute the members across those groups evenly (as much a ..read more
Visit website
What is your scalable approach for encrypting strings within an automated powershell script while trying to stay within the confines of powershell?
Reddit » PowerShell
by /u/coolguycarlos
7h ago
This revolves around use cases in which you need to add authentication keys and\or credentials to your powershell script in order for it to be able to access a resource but don't want it to show in clear text in your script. Key point is that it needs to be scalable. I know of two methods of doing this. Method 1: Create EFS certificate with SYSTEM account. Add password information to a text file. Encrypt text file with EFS certificate. Export EFS certificate with private key Distribute EFS certificate to all target endpoints via a CertPolicy GPO Distribute encrypted text file along with power ..read more
Visit website
23042024 -> 23/04/2024 how to convert this string to date
Reddit » PowerShell
by /u/almsfurr
7h ago
How in God's name do I convert strings that represents dates in Euro format to actual DateTime? I've tried Parse, ParseExact. Is there a way? submitted by /u/almsfurr [visit reddit] [comments ..read more
Visit website
Opening browser using session created and populated from Invoke-WebRequest
Reddit » PowerShell
by /u/Drogen24
7h ago
I'm quite adept at using Invoke-WebRequest for scraping and interacting with websites/maintaining sessions headless, but a colleague has asked for a Powershell script that opens Chrome and logs in (not very secure, I know but it's InfoSec asking so hey ho), they're sending TAB keys and the password, but that doesn't work if the user interacts with the computer whilst this is running. $pathToChrome = 'C:\Program Files\Google\Chrome\Application\chrome.exe' $tempFolder = '--user-data-dir=c:\temp' # pick a temp folder for user data, not always needed #$startmode = '--start-fullscreen' # '--kiosk ..read more
Visit website

Follow Reddit » PowerShell on FeedSpot

Continue with Google
Continue with Apple
OR