Monday, June 26, 2023

How to skip the "Add a Microsoft Account" on System Startup

Microsoft is pretty good at making Windows a good generic utility laptop for web surfing and general word processing work.  Setting up the laptops so users don't need a domain or a login works fairly well and worked really well in XP and Windows 7.  However under windows 10 Microsoft can get really annoying with wanting the device associated with a Microsoft Account.


To by pass this notification, it is actually a very simple setting in Windows 10.  

Open the settings App



Open Notifications & Actions Settings



By default most if not all the notifications are on.  To disable the Microsoft notification un check the "Suggest ways I can finish setting up my device to get the most out of Windows"



Once unchecked the "Add a Microsoft Account" will go away once you reboot, and won't appear on startup.



Friday, June 23, 2023

Using Powershell to Fix AD Time Drift.

 

Time syncing AD Controllers is an on going bane.  Since I've been working as a system administrator; Active directory time sync has been a problem in most places I've been; with the system time being off by a few seconds up to 15 minutes.  

I wrote a post back in 2001 about fixing AD Time drift using a registry entry for clients and servers, which has worked fine for the most part.  Recently though the power was shut off in our main data center; so we shut down all our systems for the night till power was to be restored because we didn't have a UPS systems that could run for the length of the outage.  

When the outage was over and I turned the servers I had one active directory controller off by 5 minutes and the other off by 7 (using my watch as the source for time).  I fixed the clocks manually so they were within a few seconds of each other but wanted a better solution.

So I decided to write a powershell script to update the time.  On the AD Controllers in my org W32tm is stopped and not running.  So I am going to setup task scheduler to run this on a schedule that I have yet to determine.  For now though I've written this script; where $TimeServer is a network time server such as time.windows.com or time.apple.com or some other ntp server or IP.

updatetime.ps1

net start W32time

W32tm /config /manualpeerlist:$TimeServer,0x8 /reliable:yes /update

w32tm.exe /config /update

W32tm /resync /force

net stop W32time

So you have to make sure powershell scripts are permitted to run.


To run the powershell script with task scheduler I use a bat file to execute it.

@ECHO OFF

powershell.exe -executionpolicy remotesigned -File $PATH/$TOSCRIPT.ps1

Now after running my powershell script on both AD Controllers they are now in perfect sync.


Sources:

https://optionkey.blogspot.com/2021/01/ad-time-drift-and-how-to-fix-it.html

https://www.checkyourlogs.net/windows-time-sync-the-fixes/

https://learn.microsoft.com/en-us/services-hub/health/remediation-steps-ad/configure-the-root-pdc-with-an-authoritative-time-source-and-avoid-widespread-time-skew

How to fix CURL call imporitng an RSS feed on a site blocking CURL calls

There is a 3rd party service provider that my organization uses called bibliocommons.  They have these nice book carousels.  However the car...