QwertyMash
Members-
Posts
149 -
Joined
-
Last visited
Content Type
Forums
News
20th
EduGeek EDIT Conference
Blogs
Everything posted by QwertyMash
-
Spot on Yeah it needs more like haha it's just literally the core of what he asked for haha
-
Oh don't get me wrong I literally said I threw it together. I figured they could maybe add what they needed check wise and I totally agree with you haha For instance it doesn't check for other people already having that UPN, when you sat writing Powershell on the mobile website it gets a little tedious haha Original poster, if you'd like help finishing off the script to be more robust as suggested by the above just message me and while I'm at the PC I'd happily help.
-
Hello, Here is a quick script I just slapped together for you that would change all the users UPNs - to [email protected] - there is two variables at the top to change. It need ran as an administrator and on a device wither with RSAT installed or from a domain controller. I have done some very basic testing on my development domain and it worked but I recommend doing a few little tests of your own first. If you want any help or would like it to do more just fire me a message. Thank you, CaptainQwerty. # Script: UPN change # Author: CaptainQwerty # Date Created: 28/07/2019 #requires -module ActiveDirectory #requires -RunAsAdministrator # Change there two variables, the top one is your domain and the second one is the OU that contains the users $domain = "Example.co.uk" $ou = "OU=Staff,DC=Example,DC=co,DC=uk" write-host "Importing Acive Directory module" Import-Module ActiveDirectory # Getting all users from the OU $users = Get-ADUser -filter * -SearchBase $ou # For each user in the OU change their UPN foreach($user in $users){ # Generating the UPN $firstname = $user.GivenName $firstInitial = $firstname.substring(0,1) $upn = "$firstInitial.$($user.surname)@$domain" # Setting the users UPN set-aduser $user -UserPrincipalName $upn } edit: Fixed formatting
-
I can write you a Powershell script if you like to do this for all the accounts. Are they in a particular OU? Thank you.
-
I personally would only be turning on mission critical services, as in ones that 2 weeks of downtime would be too costly. If the gear could afford to be off the entire time I would leave it off.
-
[1809, ou] Remote random logons form Administrator
QwertyMash replied to nicholab's topic in Windows 10
The logon type 3 is a network logon, so stuff like connecting to a shared folder on that machine from another device on the network or similar tasks. I believe WMI queries in some instances when done across a network can also result in a similar or the same log being made. -
This is where not having a proper domain is proving to be a nightmare. Is there absolutely no way you guys can get an old computer up and running as a domain controller? Your life would be far easier. So much more flexibility with Group Policy.
-
USB drives for back ups? I'd consider something a little less volatile myself like haha. I finish work at 4, I will look at this tonight for you if no one replies earlier with the solution for you. - - - Updated - - - I feel like what I said earlier as a modification should have worked at a quick glance at it so yes maybe something else is wrong
-
Very correct like, a fully registry dump and slap will likely cause a lot of odd issues.
-
Yeah don't be doing that. That is an awful idea. WHAT OPERATING SYSTEM IS IT!!!!! haha
-
What operating system are you on? What is the regkey when it is disabled and what is it when it is enabled? Will look at a script for you.
-
So its a batch file. What operating system are you using? 7? 10? How is it being executed?
-
The users always log on as admin? What operating system you running? and how are you delivering the script?
-
If the script is running under their credentials not as an administrator it won't work as they won't have access to modify the registry key. Is it being executed as a standard user or administrator?
-
I actually wrote a program to write all my reports called b*llshit-it haha Very much a similar thing to this. It would write a pretty unique report for the student per class based off a few answers about their grades, attendance and attitude. Not once did I get pulled up on my reports haha. I will post a gif tonight when I get home. Your work looks good!
-
Outlook Email Signature Automation with AD Attributes
QwertyMash replied to QwertyMash's topic in Scripts
I hope it does, PM me if you need any help with it.- 135 replies
-
- group policy
- outlook
-
(and 2 more)
Tagged with:
-
Outlook Email Signature Automation with AD Attributes
QwertyMash replied to QwertyMash's topic in Scripts
Glad it is working for you Yeah Mailflow can have some unexpected results when it comes to email threads ending up with a lot of signatures at the bottom of the email and stuff haha.- 135 replies
-
- group policy
- outlook
-
(and 2 more)
Tagged with:
-
[color=#333333][i]#Requires -Version 3.0$Source = "C:\iSCSIVirtualDisks\man-vd.vhdx"$Destination = "E:"$TargetDir = "{0}{1}" -f $Destination, (Get-Date).ToString("yyyy-MM-dd HH.mm.ss")Get-ChildItem -Path $Destination -Directory | Where-Object { $_.Name -match "^\d{4}-\d{2}-\d{2} \d{2}\.\d{2}\.\d{2}$"} | Sort-Object LastWriteTime -Descending | Remove-Item -Force -RecurseIf (-not(Test-Path "$TargetDir")) { $Null = New-Item "$TargetDir" -Type Directory; Copy-Item -Path "$Source" -Destination "$TargetDir" -ErrorAction Stop -Verbose }[/i][/color] Can try this. Obviously in a test environment first.
