Blog

PowerShell: Use RoboCopy & Volume Shadow Copy to Mirror Terrabytes of Data

version 0.2 <#.DescriptionCurrent Features:1. Check for any errors on the Sources or Destinations and generate…

Reference Entries of Office 365 records for Internal & External DNS

General Office 365 email setup check list: MS requires that each smart-host configuration or send…

PowerShell: Measure File Copying Time

The scripty: $sourcesAndDestinations=@("C:\Users\kimconnect\Desktop\test\test1 C:\Users\kimconnect\Desktop\test\test2","C:\Users\kimconnect\Desktop\test\test2 C:\Users\kimconnect\Desktop\test\test3")$testPath="C:\Users\kimconnect\Desktop\test\test1"$switchesMirrorDirectories="/MIR /SEC /W:3 /FFT "$dateStamp = Get-Date -Format "yyyy-MM-dd-hh-mm"$currentPath=(Get-Item -Path ".\").FullName$log="/LOG+:$currentPath\robocopy-log-$dateStamp.txt"function…

PowerShell: Discover Domain Controllers and Classify Each As VM or Physical

Current Version $dcObjects=Get-ADDomainController -Filter * | select Name,OperationMasterRolesforeach ($dc in $dcObjects){ $dcName=$dc.Name $dcRole=$dc.OperationMasterRoles try{ $machineModel=(Get-WmiObject…

Veeam: Hyper-V ConfigStoreRootPath Errors

Error Message ---------------------------Veeam Backup and Replication---------------------------ConfigStoreRootPath cluster parameter is not defined. We will not be…

PowerShell: Install RSAT

What problem does this solve? dcdiag /test:dns dcdiag : The term 'dcdiag' is not recognized…

Outlook Error: An Encrypted Connection Not Available

Symptom: The Fix: Run: control.exe > click on Mail Click on Show Profiles Click on…

PowerShell: Export Exchange Mailboxes

Export 1 mailbox $userAlias="kungfu.panda"$storageUNC="\\FILESHERVER01\Backups\PSTs"# Import Exchange Management PowershellAdd-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapIn;$mailboxRequest=(New-MailboxExportRequest -Mailbox $userAlias -FilePath "$storageUNC\$userAlias.pst").Mailboxfunction monitorCompletion($check){ $migrationStatus=(Get-MailboxExportRequest…

PowerShell: Recover Deleted Active Directory Objects

$domain="kimconnect"$ltd="com"$dc="dc01"$userToRecover="Tom Cruise"# Enable Active Directory Recycle Bin# Enable-ADOptionalFeature 'Recycle Bin Feature' -Scope ForestOrConfigurationSet -Target "$domain.$ltd"…

PowerShell: Office 365 Bulk Licensing, Changing IDs, Enabling POP3

Connect to Office 365 # Office 365 Global Admin Credential$username="O365globalAdmin"$password=ConvertTo-securestring "PASSWORDHERE" -AsPlainText -Force$cred = New-Object…

Office 365 Mail Import Using CSV Files

The Point and Click Method Prepare a CSV file in this format [email protected]@[email protected] Access Office…

MS Exchange 2010: Mailbox Repair

PowerShell snippet to initiate repair # set user alias or email addresses here:$userAliases="user1","user2"foreach ($user in…

PowerShell: Fix Email Aliases as Preparation for O365 Migration

Check SMTP Addresses of On Premise Mailboxes function checkSmtpAddresses{ $microsoftDomain1="@kimconnect.mail.onmicrosoft.com" $microsoftDomain2="@kimconnect.onmicrosoft.com" $dotLocal=".local" $onpremMailboxes=Get-Mailbox -ResultSize unlimited…

Excel Challenge: Update Records with a New Email Domain if It Matches Deprecated Domain

PrimaryEmail (Cell B2) EmailUsername Domain [email protected] =LEFT(B2,FIND("@",B2)-1) =RIGHT(B2,LEN(B2)-FIND("@",B2)) FixedPrimaryEmail =IF(D2="olddomain.org",C2&"@newdomain.org",B2)

Office 365 User Logon Instructions

How to Access Email via Outlook Web Access (OWA) Navigate to: https://login.microsoftonline.com/common/oauth2/authorize?client_id=00000002-0000-0ff1-ce00-000000000000&redirect_uri=https%3a%2f%2foutlook.office365.com%2fowa%2f&resource=00000002-0000-0ff1-ce00-000000000000&response_mode=form_post&response_type=code+id_token&scope=openid&msafed=1&msaredir=1&client-request-id=d6f712e4-8e0b-c690-dcc7-3082fcfa3760&protectedtoken=true&claims=%7b%22id_token%22%3a%7b%22xms_cc%22%3a%7b%22values%22%3a%5b%22CP1%22%5d%7d%7d%7d&nonce=638636475879321385.58dd735b-4862-46c7-8d7a-ae13e3f0226d&state=Dcs7FoAwCABBos_jYBIIH48TRVtLry_FbLcFANa0pNIyYMqurMPE7WDq7LKLRxjLicOVcOhl6GET59355qcRaZR8t_p-s_4 Input the provided…

PowerShell: Obtain List of Hyper-V Hosts in All Domains of All Forests

Version 0.03: https://blog.kimconnect.com/powershell-obtain-list-of-hyper-v-hosts-via-active-directory/ Version 0.02: https://blog.kimconnect.com/powershell-get-nic-mtus-of-all-hyper-v-hosts-in-domain-forest/ Previous version: # listHyperVHostsInForests.ps1# version 0.01# This function scans…

PowerShell: Windows Automated Disk Cleanup

##################################################################################     <#      This script is created to automate the cleanup activity. Doing so will benefit to reduce the size of disk.     This script will perform the following   1. Clear windows temp and user temp folder   2. Empty recycle bin   3. Disk Cleanup   4. Clear CBS cabinet log files   5. Clear downloaded patches   6. Clear downloaded driver   7. Clean download folder      Note:  …

PowerShell: Exchange 2010 Server Update & Restart

function stopExchange{ net stop msexchangeadtopology /y net stop msexchangefba /y net stop msftesql-exchange /y net…

PowerShell: Windows 10 Preparation Script

Set PowerShell execution policy prior to running script as an Administrator Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Confirm:$False…