I wrote a Snake game in PowerShell. (Requires Version 5.1)
submitted by /u/NuvolaGrande [link] [comments] The post I wrote a Snake game in PowerShell. (Requires Version 5.1) appeared first on How to Code .NET.
View ArticleNeed help with SCCM PowerShell object
Good morning, I am attempting to write a report of Configuration Manager collections and their members (to help our service desk). The code looks like this: https://pastebin.com/gx1kAkFD However the...
View ArticleHow can I see which commands/variables are hogging all the RAM?
I built a script which foreach’s through a folder of text files searching for certain strings and putting those into a CSV. It works fine but uses a LOT of memory, some of the files are 1GB+ so it...
View ArticleSQL Like commands against POSH Objects
Hello, I have four lists of computers (computernames) from different sources that I am getting with powershell from currently WSUS, two MSSQL Databases and Active Directory. My plan is to use this to...
View ArticleUsing Invoke-ProcessASDatabase
I am trying to use the Invoke-ProcessASDatabase cmdlet for the SqlServer module. Setup: I have a server setup with SQL 2016 installed with both SQL and SSAS installed. I have 2 Multidimensional...
View ArticleCalling PS script through task scheduler
Hello all, I’m written a powershell script that is auto-elevated when run through the task scheduler. I am using schtasks in command line via shortcut to call the task scheduler which then runs the...
View ArticleHow can I write a variable into an open window?
My goal is it to open IE in Kiosk mode and to open multiple tabs. To open a second tab in kioskmode you have to press Ctrl + o which works fine. Then you put in the URL of the Website you want to...
View ArticleGet all nested AD groups recursively.
Hi all! I am putting together a view of my environment, and I’d like to see all of my nested groups. I’ve seen this solution, which is awesome, but doesn’t give me the bigger picture:...
View ArticleLine of PS code that makes your PS script run in the background, hides the...
I have a PS script badged with Windows Task Scheduler that runs every five minutes. I’ve noticed when it initiates, the command prompt opens up briefly then goes away (the very nature of the script...
View ArticleList all users with deletemessage enabled rule
has anyone looked into this? We have seen compromised emails have rules added to delete emails. unfortunetly getting users to identify phishing emails is a task within itself, but have read enough and...
View ArticleIs there a command to run on a print server to see when the last time a...
Basically I want to clean up my print server, I want to know if I can run a script that can pull the last time a job was sent to a printer or someone connected to it and export to CSV so I can start...
View ArticleCan we have a “Just Another PowerShell Hacker” thread?
The game is simple: write an extremely obfuscated script that prints out “Just Another PowerShell Hacker”. One famous Perl example is...
View ArticleGenerate-Password
Hi guys, got chatting in the office today and ended up trying to make a function that takes input from user for 2 memorable words securely and combines them with a random alphanumeric string to output...
View ArticleFor you reporters out there. Get-UAL and it’s variations. On 2012 and above...
I didn’t find this until a year ago and it’s been great to find out if a service has been accessed and by who. Here’s a link to what it can do Get-UAL. I encourage you to check it out....
View ArticleHow to update the ad computer object with a login script.
Set-ADComputer isnt on the windows 7 workstations, so how could you accomplish the task? i found a VBscript but this is /r/Powershell… submitted by /u/wigrif [link] [comments] The post How to update...
View ArticleWINspect – Powershell-based Windows Security Auditing Toolbox
submitted by /u/hack4net [link] [comments] The post WINspect – Powershell-based Windows Security Auditing Toolbox appeared first on How to Code .NET.
View ArticleConfigure module to run on network computers
I found a script that enables/disables storage devices. By default we disable this company wide, but occasionally we are asked to temporarily enable a machine’s USB. I’ve been excluding workstations...
View ArticleIs powershell the right tool to setup a user state?
So say like we add a new user to a Windows 10 computer. I want to turn off sync center Disable one drive Setup the machine to screen saver after 20 mins and require login to get back in Plus a host of...
View ArticleRegex Question
“robert.paulson@paperstreet.co” -replace some_reg_exp I want to strip/remove @ and everything before it so I’m only left with paperstreet.co. How do I do it? Also any good guides on regexp in...
View ArticleGet Merged Column Range
I am working with thousands of spreadsheets that are basically set up the same but differ a little bit in some areas. There is some text that is merged in a range of columns. Under this merged text,...
View Article