22. november 2022

Skift fra Public til Privare network (Powershell)

Sommetider starter Windows servere op med Public Network og er derfor ikke kontaktbar (pga. firewall indstillinger)

Dette kan som regel løses ved at genstarte Network Location Awareness servicen.
Sæt den herefter til "Delayed start" og alle 3 recovery til "Restart service"

Powershell

Get-NetConnectionProfile


If you have only one network connection you can change the profile to private by typing:

Get-NetConnectionProfile | Set-NetConnectionProfile -NetworkCategory Private


If you have multiple network interfaces and would like to change a specific adapter use the Interface Index Property like this:

Set-NetConnectionProfile -InterfaceIndex 3 -NetworkCategory Private


The same command also works to switch back to a public profile

Set-NetConnectionProfile -InterfaceIndex 3 -NetworkCategory Public

2. august 2022

Office365 cached Exchange 3 days

https://admx.help/?Category=Office2016&Policy=outlk16.Office.Microsoft.Policies.Windows::L_CachedExchangeModeSyncSlider

HKEY_CURRENT_USERsoftware\policies\microsoft\office\16.0\outlook\cached modesyncwindowsettingdaysREG_DWORD3

6. juli 2022

Send e-mail from powershell - with TLS !

$body = "tester email fra powershell"

$fromaddress = "someone@somewhere.com"

$toaddress = "receiver@anywhere.com"

$subject = "test mail"

$smtp = "smtp.office365.com"

$port = "587"

Send-MailMessage -from $fromaddress  -to $toaddress -subject $subject -body $body -BodyAsHtml -UseSsl -Credential (Get-Credential)  -smtpServer $smtp -port $port

16. maj 2022

What to Do When a Deleted User Still Appears on the Windows 10/11 Login Screen?

If the user has been deleted and still appear on logon screen :

Run NetPlWiz.exe

Select User must use Ctrl+Alt+Del to logon, on advanced tab, click Ok

Reboot

Run NetPlWiz.exe

Un-select User must use Ctrl+Alt+Del to logon, click Ok

Reboot

11. maj 2022

Reset og rens print-spooler

 Køres fra eleveret kommando prompt


Gå til c:\windows\system32\spool

Dir printers (vil vise evt. døde printjobs)

Net stop spooler (Stop print spooler)

del /Q /F /S "%systemroot%\System32\Spool\Printers\*.* (Vil slette alle spool filer)

Net start spooler (Start printspooler)



Gem som SpoolerReset.CMD :

c:
cd\
cd windows\system32\spool
dir printers
Pause
Net stop spooler
del /Q /F /S "%systemroot%\System32\Spool\Printers\*.*
Net start spooler
Pause


DriverStore Explorer

 Release DriverStore Explorer v0.11.79 · lostindark/DriverStoreExplorer · GitHub


Manage the Windows driverstore, like delete unwanted printer drivers

13. april 2022

Fix trust-relationship failed WITHOUT domain rejoining !

https://theitbros.com/fix-trust-relationship-failed-without-domain-rejoining/

https://community.spiceworks.com/how_to/108912-fix-the-trust-relationship-between-this-workstation-and-the-primary-domain-failed


You will need access to the local OS (and LAN with contact to domain) :

Pull out the LAN cable, shut down computer and restart PC

Log on with the original credentials (Domain logon - still LAN cable disconnected)

When the desktop appear, insert LAN cable


If this is not possible you will need to logon as a local administrator


You can view the last password set time for a computer object account in the AD domain using the PowerShell cmdlet Get-ADComputer

get-adcomputer -Identity [computername] -Properties PasswordLastSet


You can verify that the computer local password is synced with the computer account password on the domain controlled

Test-ComputerSecureChannel -repair -credential DOMAINname\ADMINISTRATORname -verbose

No reboot needed




PowerShell command

NAME

    Test-ComputerSecureChannel


SYNTAX

    Test-ComputerSecureChannel [-Repair] [-Server <string>] [-Credential <pscredential>] [-WhatIf] [-Confirm]  [<Common

    Parameters>]

21. februar 2022

Office 365 DKIM Microsoft 365

Log på, på [https://portal.office.com]

Vælg "Admin" ude til venstre (evt. gennem Partner)

Under "Administration", vælg "Sikkerhed"

Under "Mail og samarbejde", vælg "Politikker og regler"

Vælg "Trusselspolitikker"

Vælg "DKIM"

Vælg det domæne som det drejer sig om


eller

https://security.microsoft.com/dkimv2?rfr=scc_dkimv2

14. februar 2022

7. februar 2022

Skift kodeord Remote Desktop fra Mac tastatur - Change AD password on macOS via Remote Desktop

 fn + Control + Option + Backspace (svarer til Ctrl + Alt + End)


The macOS keyboard has a couple of different keys compared to a Windows device. The most obvious are:

Windows KeymacOS Key
WindowsCommand
Control (CTRL)Control
ALTOption
Delete (DEL)fn + Backspace
Insert (INS)fn + Enter
Home / Endfn + Right / Left
Page Up / Downfn + Up / Down