PowerSploit – Pentesting with Powershell
submitted by /u/InvisibleTextArea [link] [comments] The post PowerSploit – Pentesting with Powershell appeared first on How to Code .NET.
View ArticleADSI query help needed
Hi! Created my first script in PS using ADSI. Goal: get AD account information based on DisplayName property. The input is a csv file which contains users and the header of interest of course is...
View ArticleNew guy here; want to extract email adresses from a local folder with bounced...
Hey all, I just got a USB stick with thousands of bounced e-mails, and was asked to retrieve the email adresses of these bounced mails. Can any of you help me retrieve these with a script? submitted...
View ArticleTask Scheduler – run a PS function
That’s my rather basic script: function CheckSomeService { $ServiceName = "FooBar" $arrService = Get-Service -Name $ServiceName if ($arrService.Status -ne "Running") { Start-Service $ServiceName } }...
View ArticleGet-Printer / foreach help
I have been working on a printer dashboard for work using this script: http://pastebin.com/uxTXdeFD Starting at line 17, it runs through all the printers, and does some stuff. get-printer returns a...
View ArticleService accounts set up with mailbox hosted on O365.
Hey guys, Trying to find the best way to modify our service account function to create mailboxes on O365 by default, as opposed to our on premises Exchange server. http://pastebin.com/NpJvvY3M This is...
View ArticlePowershell Copy-Item to remote public desktops
Hello, I am attempting to copy some files off a file share to remote computers from a txt file. I am looking to store these files on the public desktop. I DO NOT have access to GPO and I have a...
View ArticlePowerShell equivalent of cURL query?
What would the PowerShell equivalent of this cURL query be? curl -k --user admin:password https://host:9999/host-service/domains -H "Content-Type: application/json" -X GET I’ve tried the following...
View ArticlePSA: $env:COMPUTERNAME and hostname are not the same
submitted by /u/conan1989 [link] [comments] The post PSA: $env:COMPUTERNAME and hostname are not the same appeared first on How to Code .NET.
View ArticleFind common groups in a set of users
I’m having trouble figuring out how I could take a group of say, 25 users, pull their AD groups, and then compare them and create a list of only the groups shared by all 25 users. I’m doing a foreach...
View ArticleManually running script works fine. Running through Task Scheduler doesn’t.
Weird behaviour. I made a script which checks files in a folder to see if they are older than a certain date, if so, outputs the name of the file in a .txt log file. This works great when right...
View ArticleCan’t run scheduledjob from script
I am trying to create a scheduled job at the end of one of my scripts. It is supposed to set up a separate script to run at startup, this is how I’m trying to do it. $t = New-JobTrigger -AtStartup...
View ArticleWaiting for an executable to finish running before proceeding.
I recently spent a lot of time trying to figure out how to get my script to wait until an executable was finished before running the rest of it’s code. Because of security policies on the network I...
View ArticleHow to use powershell to execute a program remotely?
Hi Folks, I am looking to run the following command on multiple computers in my domain. I have googled and found a dozen “possible” things to try and none have so I thought I would ask you all. I need...
View ArticleCall Powershell from Javascript function
I am looking to have an onclick function in javascript call a powershell script, and based on what that powershell script does, javascript will go on its way. I can’t find a suitable response from...
View ArticleAdding methods to a Powershell Class
I’m experimenting with making my own classes, and I was wondering if anyone knew how to make a method that would evaluate variables stored within the class. I know how to do this in c#, but I can’t...
View ArticleGet-ADUser $logonname -ErrorAction SilentlyContinue
I’m looking to silently continue on this portion, not the entire script so therefore I do not want to set $ErrorActionPreference = "SilentlyContinue" Is there a reason why this is still spitting out...
View ArticleLocation information for a disk drive
I am trying to create a WMI query to find the location for a disk. The problem: In VMware on a guest with multiple drives on multiple controllers, the SCSI BUS and target IDs in Windows do not align...
View ArticleArchiving emails in powershell.
Is there a way to auto archive emails in powershell based off of certain parameters? I.E if in inbox and older than x date . Or if it’s within a subfolder of the inbox and from personA@domain.com...
View ArticlePowerShell at Target
Hey, y’all! I’m writing a blog post on how we’re using PowerShell at Target. Specifically, I’ve authored a module that we use to troubleshoot our Point-of-Sale systems (registers and servers), and...
View Article