A big “thank you” to this community
Story time. Hopefully this is an inspiration to some of you just starting out with PowerShell. TL:DR Taught myself PowerShell over the course of the last 18 months and wanted to thank the community...
View ArticleHow can I convert my script to run in parallel jobs?
Hi guys, I have a little script that gathers all Windows machines from active directory, and then queries them to get the currently logged on user: $Computers = (Get-ADComputer -properties Name...
View Article`Get-ADUser | Select-Object` extremely slow compared to Get-ADComputer
I am trying to pull down AD information to dump into an SQLite DB along with other data sources so I can quickly run reports. The dump part works fine – it uses the PSSQLite module and the...
View ArticleEntry level powershell assignment, any help would be appreciated.
Question below: The ABC company is reorganizing its inventory. All of the items in its inventory have an alphanumeric part number like 400CVY409, 400 is the category number, CVY is the inventory code...
View ArticleNeed help surpressing driver install popup.
Pulled this from TechNet: Clear-Host # This procedure adds a new printer Function InstallNewPrinter{ Param ([string]$currentPrinter, [string]$newPrinter) Write-Host "CurrentPrinter : " $currentPrinter...
View ArticleIssue calling a SOAP method
I have this example code (obfuscated for reasons): $url = 'https://servername/SOAPRequestWebService/?wsdl' $SOAPRequest = New-WebServiceProxy -Uri $url -Namespace SR -Class WebServiceProxy...
View ArticleHow to add to this “autodelete” PowerShell script?
Hi all, I’m looking to utilize this script that I have found. I need it to delete files that are: older than 30 days start with set characters (ex. servername) $limit = (Get-Date).AddDays(-30) $path =...
View ArticleThat feeling when you’re a PS n00b but you run your first script in production
It was a bit gut-wrenching. But it worked! I wrote a backup script to automate a process I’ve been doing manually for way too long. Built it at home, tested it in my home lab, figured out the game...
View ArticleLooking for a script to query a server pool to find printer name mismatch
One of our clients have several terminal servers that they connect to via published rdp applications. Their default printers must be changed upon login every time. I have looked through their GPOs and...
View ArticleAccess Denied When Changing Service Start/Stop States on RPC, GroupPolicy...
We recently had a problem on a few machines where almost ALL of the Windows Services startup/start changes were changed (which we’ve identified and resolved), now we have to fix each workstation...
View ArticleHow can I append this script to omit a list of installed software?
<# .SYNOPSIS Get-InstalledSoftware retrieves a list of installed software .DESCRIPTION Get-InstalledSoftware opens up the specified (remote) registry and scours it for installed software. When...
View ArticleReddit API Authentication Function
I had wrote this a while ago, since authenticating always seems to be half the battle for me. I realize now I wrote this before I knew about creating hash tables and just adding them to a new-object...
View ArticleExtract multiple tar.gz, rename extracted file
Hi All – I’ve been searching, trying to find a PS solution and am struggling… I have a download that gives me a bunch of tar.gz files that I need to extract. I was able to do that, but the problem is...
View ArticleError Output to .csv
So I’m working on installing some updates remotely and was wondering if there was a way to output the results of installs other than 0(successful install as reported by PS) to a .csv file submitted by...
View ArticleTop 50 PowerShell Blogs And Websites For Developers & business users
submitted by /u/Prateeksingh1590 [link] [comments] The post Top 50 PowerShell Blogs And Websites For Developers & business users appeared first on How to Code .NET.
View ArticleCan’t Figure out for to Loop function
Hi all, I have been racking my head in trying to get my script to work. Basically, I am trying to use ForEach to loop through a list of computers and find out if it has certain software installed. The...
View ArticleMy batch powershell file does not work
I’m trying to make a batch file that runs this line of code: “$wsh = New-Object -comObject WScript.Shell; $Shortcut=$wsh.CreateShortcut(“$HomeAppDataRoamingMicrosoftWindowsStart...
View ArticleColleague at work deleted 300 user accounts – PowerShell saves the day.
Story in short – An individual at work authorizated one of my colleagues to deleted AD user accounts and email mailboxes, older than a set period of time. I was currently consulting onsite at the...
View ArticleAm I the only person on this sub who has tried to pass Gmail credentials...
Looking to schedule some automated emails via Task Scheduler using Gmail (or Office 365 if needed). Either my Google-Fu is failing me or its much harder than it seems: $emailSubject = “xxx – Windows...
View ArticleUsing powershell commands inside of batch commands
Greetings! I hope I can get some insight into this as I’m unable to get it functioning. Long story short, I need to run powershell commands inside of an unattended answer file that adds a powershell...
View Article