For anyone writing modules in VSCode
gist alternative I was getting a little annoyed with intellisense not loading automatically so I made this snippet. Get-ChildItem $PWD*.ps1 -Recurse | ForEach-Object {...
View ArticleFind and replace script
Hello, Looking for some help writing a script to restore some files. Here is what I am looking to do. Source : C:/Files/ has a number of folders with files, some of them were encrypted with Ransomware...
View ArticleRestarting in parallel Jobs vs Workflow
Hey All, Looking to restart a service across multiple service in-parallel. Would this workflow be sufficient or should i use jobs? I read a few articles criticizing workflows saying that it is...
View ArticleA Script to Backup or Clone Your Computer’s Chocolatey Packages
submitted by /u/treefroog [link] [comments] The post A Script to Backup or Clone Your Computer’s Chocolatey Packages appeared first on How to Code .NET.
View ArticleInternet Explorer automation powershell (the post login page doesn’t display...
Hello, I seem to be running into a real pickle here. At the end of this script after the page has logged in, I can’t seem to get the $ie variable to pull anything from the next page after logging in....
View ArticleWhat is your cooles/most usefull powershell script?
submitted by /u/VOID_INIT [link] [comments] The post What is your cooles/most usefull powershell script? appeared first on How to Code .NET.
View ArticleExport email sub-folders to from PST to MSG
I have several PST’s that need to be offloaded from a PST to MSG format in a folder. The code in the link below works a single folder/level correctly but I need it to enumerate folders beneath ‘Sent‘....
View ArticleJenkins, Powershell, AWS and Cloudflare Automated Deployment. (Part3 Cloudflare)
submitted by /u/I_script_stuff [link] [comments] The post Jenkins, Powershell, AWS and Cloudflare Automated Deployment. (Part3 Cloudflare) appeared first on How to Code .NET.
View ArticleRemoving user from all groups apart from specified group
I’m looking for a way to remove all groups excluding groups starting with “Office” from disabled users in a OU. I found this thread...
View ArticleAlternating a Variable Value
I’m generating a CSV file of users and AD Group memberships. One requirement is for every user to be part of a particular applicaiton. The application has 2 AD groups – one for each datacenter…and...
View ArticleVersion Control
Hi Guys, I’m wanting to setup some local version control for just my own use. Potentially something that could run on my local machine or on a server. Wondering if anyone has any suggestions? Thanks!...
View ArticleRunning .exe/.msi from current directory.
Any Reason why this won’t work?? or is there a much cleaner way of doing this? $scriptpath = $MyInvocation.MyCommand.Path $dir = Split-Path $scriptpath Write-host "My directory is $dir" Get-ChildItem...
View ArticleSTLPSUG March MeetUp: Investigating Vester with Brian Bunke
submitted by /u/michaeltlombardi [link] [comments] The post STLPSUG March MeetUp: Investigating Vester with Brian Bunke appeared first on How to Code .NET.
View ArticleMidMoPSUG March Meeting: Designing functions before writing code
https://www.eventbrite.com/e/midmo-powershell-user-group-tickets-22516367060 Meeting: Date: March 16th, 2017 Time: 6:00PM to 8:00PM CST Location: Veterans United Home Loans Address: 4115 South...
View ArticlePSServiceNow v1.12
The PSServiceNow module has been updated on GitHub & PowerShell Gallery. This update integrated a GitHub fork with two other contributors that added support for automation (cmdlets accept...
View ArticleTry Catch success
We always have people posting failures and questions so why not the occasional win. I’ve struggled with using Try Catch effectively until today when it all finally clicked. Up until now I’d wrote...
View ArticleDaily PowerShell Challenges
Hi all, I went a month or so without writing much of anything in powershell other than basic one liners for AD, Exchange Online and running some of my more complicated cmdlets I’ve created. I feel...
View ArticleGet-GPO > Missing DisplayName property for a few GPOs
Title mostly says it all. Working on an issue trying to track down errors for a GPO GUID. When I try to use Get-GPO it finds the GUID, but the DisplayName is blank. This of course makes finding it in...
View ArticleFinding parameter values
I am very new to powershell. If this question doesn’t make sense maybe someone can explain what I am missing. How do you discover available values for a parameter? For example:...
View Article“Wrong time” SQLPS query
Due to a time difference from y workplace and the database server, I get a 1 hour difference in the dates when I query it. Im not sure how to correct that properly. I could just ad 1h, but I would...
View Article