PowerShell Regex Examples

https://regex101.com/ handy website to check your regex results Regular Expression Language – Quick Reference Simple comparison to find a part of a line that matches “.*.enc” where the * is 3 characters or more and  each character is a-z or A-Z the \ is used to escape the .

e.g. .docx.enc .doc.enc
Continue reading…


Add Users As Local Administrators Using Group Policy Preferences

  e.g. Create a security group called LocalAdmins-PC1 for PC called PC 1 apply this policy preference and those users that are members of LocalAdmins-PC1 will have local admin rights     You create  security groups with the Computer name in them . The policy then uses the environment Variable %Computername% to apply the security […]
Continue reading…