Manually Deliver BitLocker Data to AD in Powershell
article #1480, updated 1070 days ago

Here it is:

$BLVolume = Get-BitLockerVolume -MountPoint "C:"
Backup-BitLockerKeyProtector -MountPoint "C:" -KeyProtectorId $BLVolume.KeyProtector[1].KeyProtectorId

Categories:      

==============

Microsoft Update Health Tools, and PSWindowsUpdate
article #1455, updated 1072 days ago

The Microsoft Update Health Tools appears to be an optional add-on which helps Windows do updates. Beyond that all of my searching has come up with vagueness. But Microsoft recommends it and often installs it without informing us, so probably it helps fairly often.

Microsoft Update Health Tools comes in KB4023057. To install KB4023057, we can use PSWindowsUpdate:

www.business.com/articles/install-windows-patches-powershell/

Here’s a complete run-anywhere command paste for preparing to use the module (administrative shell only please):

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Set-Executionpolicy RemoteSigned -Scope Process -Force
Install-PackageProvider -Name NuGet -Force -ErrorAction 'SilentlyContinue' > $null
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
If (Get-InstalledModule -Name PsWindowsUpdate -ErrorAction 'SilentlyContinue') {
	Update-Module -Name PSWindowsUpdate -Force
} Else {
	Install-Module -Name PSWindowsUpdate -Force
}
Import-Module PSWindowsUpdate

and the command for just KB4023057:

Install-WindowsUpdate -KBArticleID KB4023057

PSWindowsUpdate is a very interesting module all by itself, it can do lots of things, e.g., install all updates available from Microsoft. Another nice function is:

Reset-WUComponents

To get a full list of functions:

Get-Command -Module PSWindowsUpdate

Get-Help works for all of them.

One can install all updates available from Microsoft, though this can be dangerous, there are huge ones and drivers and BIOS too. So this simple command won’t be here :-)

To just see the list of available updates:

Get-WindowsUpdate

To install all available updates except one KB:

Install-WindowsUpdate -AcceptAll -NotKBArticleID KB000000

and except a list (here of two) KBs:

Install-WindowsUpdate -AcceptAll -NotKBArticleID "KB000000,KB000001"

where KB000000 is a KB to be excepted. There’s also -NotCategory and -NotTitle for items without KB articles.

Categories:      

==============

Logoff all users from Windows
article #1478, updated 1076 days ago

This will log off all users, whether console or RDP:

logoff console
quser /server:localhost | ForEach-Object {
		logoff $_.ID
		}

Categories:      

==============

Quick Way to Schedule Reboot in Windows
article #467, updated 1076 days ago

Run these in an administrative or SYSTEM-level command prompt.

In Windows 8.1/2012R2/10/2016 and later, we set a scheduled task, we do have to specify the actual full date:

schtasks /create /tn "schtasks_REBOOT" /tr "C:\Windows\System32\shutdown.exe -f -r -t 0" /sc once /st 04:00 /sd 01/01/2016 /ru System

In 8/2012R1, we have to have a “/Y on the very end:

schtasks /create /tn "schtasks_REBOOT" /tr "C:\Windows\System32\shutdown.exe -f -r -t 0" /sc once /st 04:00 /sd 01/01/2016 /ru System /Y

Under 7/2008R2 and before, it was easier, we could schedule for 4:00 AM tomorrow:

AT 4:00 c:\windows\system32\shutdown.exe -f -r -t 0

and we could schedule for 4:00 AM next Monday:

AT 4:00 /next:Monday c:\windows\system32\shutdown.exe -f -r -t 0

Categories:      

==============

Versions of Azure AD Connect
article #1249, updated 1076 days ago

Version overview:

docs.microsoft.com/en-us/azure/active-directory/hybrid/reference-connect-version-history

Categories:      

==============

Enable RDP by Command Line
article #545, updated 1093 days ago

For 10:

netsh advfirewall firewall set rule group="remote desktop" new enable=yes
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f

For 7:

netsh firewall Set service REMOTEDESKTOP ENABLE
netsh firewall set service REMOTEAdmin ENABLE
REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0

For XP:

netsh firewall set service remotedesktop enable
netsh firewall set service remoteadmin enable
reg ADD "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server" /v  fDenyTSConnections /t REG_DWORD /d 0

Categories:      

==============

How to Install Microsoft ADMX Group Policy Templates
article #1082, updated 1093 days ago

When we install new group policy templates from Microsoft, e.g., the Windows 10 set by which we may upgrade existing networks, they now come in the newer ADMX format. Do this on every domain controller:

  1. The package is downloaded as a self-installing EXE which requires you to specify a folder. Do not try to manually unpack this, for some reason the contents are in small pieces which the installer assembles. Just run the EXE and give a useful path, e.g., C:\IT.
  2. Open an administrative CMD, and CD to the extraction point. Then CD into the folder “admx”, one level down.
  3. Run the following. If your language is not en-us, replace it in the last two lines. If your servers have multiple languages, you’ll need to replicate lines with multiple language specifications.
xcopy *.admx \\%userdnsdomain%\sysvol\%userdnsdomain%\Policies\PolicyDefinitions /Y /I
xcopy *.admx %SystemRoot%\PolicyDefinitions /Y /I
xcopy en-US\*.adml \\%userdnsdomain%\sysvol\%userdnsdomain%\Policies\PolicyDefinitions\en-us /Y /I
xcopy en-US\*.adml %SystemRoot%\PolicyDefinitions\en-us /Y /I

Another very common set needing this install, is the Office Administrative Templates.

Multiple versions of Office templates coexist nicely. But the same cannot be said for Windows OS templates. It appears that when a complete refresh of OS templates is required, good results obtain by removing all of the OS templates and then installing new.

Categories:      

==============

Office 365 says "More information required", demanding MFA
article #1477, updated 1107 days ago

There are a few different places to turn this off. To turn two of them off:

  1. First log into the tenant, and browse here: aad.portal.azure.com
  2. Then click on “Azure Active Directory” on the left pane.
  3. Click on “Password reset” on the middle pane (might need to scroll down). The Properties of “Password reset” will be visible. In the right pane, choose None, and click Save.
  4. With “Password reset” still visible, click “Registration” in the middle pane.
  5. Under “Require users to register when signing in?”, choose No, and click Save.

There are a few others, and there may well be more in the future.

Categories:      

==============

Lenovo Vantage for Drivers and Firmware
article #1476, updated 1111 days ago

Here’s the page:

www.lenovo.com/us/en/software/vantage

Categories:      

==============

Estimating Time for Transfer Completion
article #1472, updated 1111 days ago

Here are some helpful estimates rewritten, courtesy of Axcient:

10GB 50GB 100GB 500GB 1TB 2TB 10TB 20 TB
1Mbps 23.9 Hours 5 Days 10 Days - - - - -
3Mbps 8 Hours 1.6 Days 3.3 Days 16.5 Days - - - -
5Mbps 4.75 Hours 1 Day 2 Days 10 Days 20 Days - - -
10Mbps 2.4 Hours 12 Hours 1 Day 5 Days 10 Days 20 Days - -
20Mbps 1.2 Hours 6 Hours 12 Hours 2.5 Days 5 Days 10 Days 49 Days -
50Mbps 28 Min 2.4 Hours 4.75 Hours 1 Day 2 Days 4 Days 20 Days 40 Days
100Mbps 14 Min 1.2 Hours 2.4 Hours 12 Hours 1 Day 2 Days 10 Days 20 Days
300Mbps 5 Min 24 Min 47 Min 4 Hours 8 Hours 16 Hours 3.5 Days 6.6 Days
500Mbps 3 Min 14 Min 28 Min 2.4 Hours 4.75 Hours 9.5 Hours 2 Days 4 Days
1000Mbps 1.5 Min 7 Min 14 Min 1.2 Hours 2.4 Hours 4.75 Hours 1 day 2 Days

Categories: