onemorenate / crpusernamestuffing Goto Github PK
View Code? Open in Web Editor NEWPS Script to stuff usernames into NPS Connection Request Policies
PS Script to stuff usernames into NPS Connection Request Policies
Hi, I'd like to schedule the script without the user credentials wrote in plaintext.
The script is scheduled to run with a user with domain admin rights and the same user is also local admin on the NPS machine.
I tried commenting some lines regarding user credentials but if I run the script this way, the task is stuck in "running" with status 0x41301 without updating the CRP policies.
Basically, I tried commenting lines 4 and 5 + another thest commenting lines 4, 5, 6 and 7
1 #Domain or Policy 1
2 $CrpName = "Nathar2016Users"
3 $Domain = "nathar2016.lab"
4 $DomainUserName = "nathar2016\bob.smith"
5 $DomainPassword = "ThePassword!"
6 $EncryptedPassword = ConvertTo-SecureString -String $DomainPassword -AsPlainText -Force
7 $DomainCreds = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $DomainUserName,
8 $EncryptedPassword
9 #$Groups = @("UsernameGroup3", "Domain Admins")
10 $Groups = @("VPN-Users")
11 Start-GetUsernames
Any help?
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.