Change Computer Hostname

Rename-Computer -NewName "NEW-PC-NAME"

Change power settings to never sleep

Powercfg /Change standby-timeout-ac 0

Enable local administrator account

net user administrator /active:yes

Set password on local administrator account

net user administrator new-password

Delete local user account

net user user /delete

Enable ICMP Ping via PowerShell

netsh advfirewall firewall add rule name=”ICMP Allow incoming V4 echo request” protocol=icmpv4:8,any dir=in action=allow

Export Microsoft 365 2FA and active users via PowerShell

Install-Module AzureAD
Install-Module MSOnline
Connect-MsolService
Get-MsolUser -all | 
    select DisplayName,UserPrincipalName,@{N="MFA Status"; E={ 
        if($_.StrongAuthenticationRequirements.Count -ne 0){ 
            $_.StrongAuthenticationRequirements[0].State
        } else { 
            'Disabled'}
        }
    } | Export-CSV -Path C:\clientname.csv
Get-MsolUser | Select-Object * | Select DisplayName,UserPrincipalName,Licenses,WhenCreated | Export-CSV -Path C:\clientname.csv

Export Mailbox Sizes of Microsoft 365 via PowerShell

Set-ExecutionPolicy RemoteSigned
Install-Module -Name ExchangeOnlineManagement
Connect-ExchangeOnline -UserPrincipalName [email protected]
Get-Mailbox | Get-MailboxStatistics | select DisplayName,TotalItemSize | Export-CSV -Path C:\clientname.csv