Send Mail with Office365 Auth

 Step-1

    mkdir ~/.certs

Step-2

    certutil -N -d ~/.certs
    Enter a password which will be used to encrypt your keys.
    The password should be at least 8 characters long,
    and should contain at least one non-alphabetic character.

    Enter new password:
    Re-enter password:


Step-3

    echo -n | openssl s_client -starttls smtp -crlf -connect smtp.office365.com:587| sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > ~/.certs/365.crt
    certutil -A -n "Google Internet Authority" -t "C,," -d ~/.certs -i ~/.certs/365.crt

Step-4

    vim  mail-office365.sh
    echo -e "Email content" | mailx -v -s "Email subject" \
     -S smtp-auth=login \
     -S smtp-use-starttls \
     -S nss-config-dir=~/.certs \
     -S smtp=smtp.office365.com:587 \
     -S from="user@office365.com" \
     -S smtp-auth-user=user@office365.com \
     -S smtp-auth-password="passwordxxxx" \
     -S ssl-verify=ignore \
    user@gmail.com

Rename windows computer command

Command Prompt:

netdom renamecomputer Thecomputernamehere /newname:newnamehere /force /userd:domain\username /passwordd:***** /reboot

 

Powershell:

Example 1: Rename the local computer

This command renames the local computer to Server044 and then restarts it to make the change effective.
PowerShell

Rename-Computer -NewName "Server044" -DomainCredential Domain01\Admin01 -Restart

Example 2: Rename a remote computer

This command renames the Srv01 computer to Server001. The computer is not restarted.

The DomainCredential parameter specifies the credentials of a user who has permission to rename computers in the domain.

The Force parameter suppresses the confirmation prompt.
PowerShell

Rename-Computer -ComputerName "Srv01" -NewName "Server001" -DomainCredential Domain01\Admin01 -Force

 

Install MSIX with powershell

 Add-AppxPackage -Path "C:\Users\MyUserName\Downloads\affinity-designer-2.0.0.msix" -DependencyPath " https://aka.ms/Microsof...

Mais vistos