Need a little help with my ForEach-Object loop.
I need to run the following cmd for each enabled local user on a machine: net user exampleusername /Active:YES I’m using the following command to pull a list of enabled users on the computer:...
View ArticlePowershell: VMware NSX duplicate VTEP addresses
submitted by /u/Net-Runner [link] [comments] The post Powershell: VMware NSX duplicate VTEP addresses appeared first on How to Code .NET.
View ArticleHow to change VPN Automatic Metric setting?
I am having an issue where I need Powershell to change a specific VPN setting when creating a VPN Network. I can create the VPN network just fine, but this is what I need help changing via command...
View ArticlePreserve property order on passed objects
I’m trying to come up with a way to pass objects between scripts/functions and maintain the property order I predefined (ex. properties of ‘Name’,’Description’,’Status’ stay in that order rather than...
View ArticleNeed Powershell script to copy a folder to all user profiles on the computer
Need Powershell script to copy a folder to all user profiles on the computer. I know active setup will work, but need a script since users do not want to reboot. submitted by /u/psnewbie9 [link]...
View ArticleHow to detect changes in DOM when using IE object to automate/login?
http://pastebin.com/nikk14zr This is a basic, bare bones version of the script. What this script will should do is, input youtube url to the website, press submit, then download the corresponding url...
View ArticleNeed help running this against a list of users in a CSV, please!
I know this is probably easy for most here.. I am in the middle of an Exchange migration and need to clear the adminCount attribute of an AD object and also enabled inheritance on the user.. I have...
View Article(help needed) How to list out the users from an OU
I’ve gone in circles on this an confused myself, so I need sanity. I’ve got users in various departments: “OU=Departments,DC=mydomain,DC=local” Under that, the groups are like Treasurer, Engineer,...
View ArticleFind user in 365 group
Im trying to find out what UnifiedGroups one of my users is a member of. I can’t seem to properly pipe this. Any suggestions? Get-UnifiedGroup | Get-UnifiedGroupLinks | Where-Object {$_.members |...
View ArticleUsing PS to Harden Tomcat Web Servers
This script took me from an F to an A on the Qualys SSL Labs server test. It’s very simple. Basically we’re just disabling old and insecure protocols such as SSLv2, SSLv3, TLSv1, and TLSv1.1, as well...
View ArticleFind nested or direct group membership differences between two AD users
Hi /r/Powershell! I made a thing! The whole thing is too long, I think, to paste here, so feel free to visit gallery.technet.microsoft.com and download it from there, I just uploaded it (and I already...
View ArticleWhat’s the PS equivalent of %1 used in CMD?
I made a few one-liners for cmd using net commands for viewing, unlocks, resets, extensions and such. For example: net user /domain %1 /expires:%2 /active:yes My one problem was doing a decent search....
View ArticleA simple script to print email subjects
submitted by /u/RondoTheHutt [link] [comments] The post A simple script to print email subjects appeared first on How to Code .NET.
View Articleis there a reasonable use case for extending the “Validate*” stuff to use...
howdy y’all, i’m curious to know if it would make sense to post an enhancement request for powershell to allow something like … [ValidateNotNollOrEmpty()]$Variable … in normal code in addition to in...
View ArticleNinja Downloader (Modular File Downloading Utility)
submitted by /u/gngrninja [link] [comments] The post Ninja Downloader (Modular File Downloading Utility) appeared first on How to Code .NET.
View ArticleRestore File Associations After Sapien Uninstall
So I have just been dealing with this for a while now, but I downloaded Sapien Powershell Studio and have since removed it and want to revert back to all original settings (i.e. notepad for double...
View ArticleSimple function for converting collections into MarkDown tables..
Made a simple function for convering collections of PSObjects into Markdown tables. Only real issue is that you have to pass your collection through Select-object before passing it to this, because it...
View ArticleFree Unit testing/TDD videos from Roy Osherove (5+ hours, with examples)
Hi /r/powershell Roy Osherove (author of The Art of Unit Testing) has some provided some training videos on Unit testing. The examples aren’t in powershell/pester, but i think Roy explains them in a...
View ArticleReinventing the Wheel in PowerShell: PoshCiphers – Part 2
submitted by /u/stackcrash [link] [comments] The post Reinventing the Wheel in PowerShell: PoshCiphers – Part 2 appeared first on How to Code .NET.
View ArticleBasic powershell script question.
I am trying to learn a bit about powershell scripts and have been trying to logically breakdown a script which includes this snippet. $destFolders | Foreach-Object { Copy-Item -Path $Source -dest...
View Article