Folder monitoring
Hey guys, I’d like some ideas on how to achieve a script for the following: I have a folder where some log files are constantly being modified (by another script, which isn’t relevant here). I’d like...
View ArticleConverting JSON directly to a hashtable with a wrapper function
submitted by /u/replicaJunction [link] [comments] The post Converting JSON directly to a hashtable with a wrapper function appeared first on How to Code .NET.
View ArticleImport-Module PowerShell Function
I’m trying to write a very basic powershell script (I have little to no experience, I’m exclusively using Google to wing my way through this) that will import a SCCM-Module from ConfigurationManager...
View ArticleHow can I check if a value in a CSV file contains a word in a TXT file, then...
I’m sorry if the title confuses you. Let me explain what I want to do. In a CSV file, I have few columns: Product code Bar code Status Pcode1 ABCXY Good Pcode2 DEFXY Good Pcode3 GHIXY Bad In a TXT...
View ArticleMicrosoft Transitioning Windows PowerShell 6.0 into PowerShell Core
submitted by /u/Net-Runner [link] [comments] The post Microsoft Transitioning Windows PowerShell 6.0 into PowerShell Core appeared first on How to Code .NET.
View ArticleStart-Process Arguments not getting added?
I’m sure that I’m overlooking something stupid simple, but I can’t for the life of me figure out why this isn’t working: $path = ".installfilessetup.exe"; $path_args = "-inputFile...
View ArticleNetwrix Share Permissions script
https://github.com/LightOfSeven/pwrshell/blob/master/NetwrixFileShareSetup.ps1 This script enumerates the shares on a Windows file server and adds the requested permissions. Purely for Auditing...
View ArticleScript to email AD Account manager every 90 days?
I want to email the person who is listed as the manager of specific AD accounts every 90 days.. I have this so far, which provides the Manager and the manager’s email address, but I’m stumped on next...
View ArticleBest Practices for Custom Objects in a Module
Hey all! I am in the middle of making my first public PowerShell module. It is a wrapper for a SaaS product’s RESTful API. Any way – the API is a basic CRUD API that works on a couple dozen or so...
View ArticleSort list and select object less than X
Hey guys, I’m using the following code to grab all computer objects in AD, Sort them and select the next available name in the list and amend it to be our naming convention. $searcher =...
View ArticleActive Directory – Bulk user creation via csv
Hello. I have created a Powershell script which successfully imports multiple users into my AD. However none of the additional fields pass through and save into the account from the information...
View Articleget-aduser with custom properties output only one user or the last
Hi all, what am I missing here? how do I make this script output each of the users in $file? Did I set the array up wrong or something? When this is run, both users should show in output. I can only...
View ArticleXML: modify a child node if a sibling node has a particular value?
I am trying to put together a script that looks for a particular value in a named childnode and then replaces the value of a sibling node depending if that value is found here is the structure of the...
View ArticleGet-ADObject directory not found on default OUs
Trying to get a count of how many contacts I have in the default users OU with the following: (Get-ADObject -LDAPFilter "objectClass=Contact" -searchbase "ou=users,dc=contoso,dc=com").count But it...
View ArticleUse PowerShell To Find Out How Long It Is Until Christmas
submitted by /u/tomatwork [link] [comments] The post Use PowerShell To Find Out How Long It Is Until Christmas appeared first on How to Code .NET.
View ArticleUninstall/Re-install Flash from Network?
Hi /r/Powershell, Is there a script (or two) which can uninstall/re-install Flash from 100 Windows 7 PCs? I work for an SMB – my boss is having our IT Dept uninstall/reinstall Flash’s latest version...
View ArticleInteractive powershell like code academy
Are there any powershell resources out there similar to code academy? submitted by /u/KingBeef4 [link] [comments] The post Interactive powershell like code academy appeared first on How to Code .NET.
View ArticleIssue with Exporting Group Members as Separate Columns to CSV
My goal is to create a script that finds all groups containing the word “Admin” in AD using the Get-ADGroup cmdlet, and then query AD for each group’s members using the Get-ADGroupMember cmdlet. I’d...
View ArticleArray query
I feel this should be simple: Script I’m trying to call: Add-PublicFolderClientPermission -identity $var1 -User $var2 -AccessRights NonEditingAuthor 2 Text files – Var1.txt and Var2.txt “Var1.txt”...
View ArticleSetting subfolder/directory as target cluster in server build script. Syntax?
submitted by /u/Moviefreak4702 [link] [comments] The post Setting subfolder/directory as target cluster in server build script. Syntax? appeared first on How to Code .NET.
View Article