PowerShell to Provision User Account in AD

Refer to the steps on how to use powershell to provision user account in AD for lab testing purpose #Create a New OU $OU = “UAT” New-ADOrganizationalUnit -Name $OU #Parameter for New Users $Path = Get-ADOrganizationalUnit -Filter {Name -eq $OU} $User = “UAT” $UPN = “aventislab.com” $LastName = “TEST” $Password = “P@ssw0rd!@#$” #To create 10 …

Read morePowerShell to Provision User Account in AD

PowerShell Script to Join AD Domain

PowerShell Script to Join AD Domain Verify DNS Server is configured correctly #Verify DNS Server $DNSServer= “192.168.1.200” if ((Get-DnsClientServerAddress -InterfaceAlias “Ethernet0” -AddressFamily IPv4).ServerAddresses -eq $DNSServer) { Write-Host -ForegroundColor Green “DNS Server is” $DNSServer } else { Set-DnsClientServerAddress -InterfaceAlias “Ethernet0” -ServerAddresses $DNSServer } Prepare an AES Key file to encrypt the Password for Domain Administrator and …

Read morePowerShell Script to Join AD Domain

PowerShell-Bulk Add & Remove Email Addresses

I come across a requirement from my client to change their existing Email Address to new Email Address for 200 users, and I had prepare the following PowerShell to update the ProxyAddresses in Active Directory to refresh this changes Get all users’ SamAccountName & DistinguishedName from the OU where all users created Defined the Old & …

Read morePowerShell-Bulk Add & Remove Email Addresses

O365-PowerShell login with saved credential

Please refer to the following steps to connect to Office 365 using PowerShell Go to Office 365 DEMO and sign up for 90 Days Trial Account if you are Microsoft Partner Download Microsoft Online Services Sign-in Assistant for IT Professionals RTW-msoidcli_64.msi and install it Run “Install-Module MSOline” to install Windows Azure AD Module Prepare the …

Read moreO365-PowerShell login with saved credential

PowerShell-Import & Export Exchange 2013 PST

Please refer to the following PowerShell Script we use to Import & Export Exchange 2013 Mailbox to local PST as 1 of our Exchange 2013 Migration Approach Export Mailbox to PST New-MailboxExportRequest -Mailbox $Mailbox -FilePath “\\EX01\M$\PST\$Name.pst” Import PST to Mailbox New-MailboxImportRequest -Mailbox $Mailbox -FilePath \\EX01\M$\PST\$mailbox.pst Monitor the Export / Import Progress Get-MailboxExportRequest | Get-MailboxexportRequestStatistics Get-MailboxImportRequest …

Read morePowerShell-Import & Export Exchange 2013 PST

PowerShell-Desktop Wallpaper based on Resolution Size

We had a new request from our client to apply the desktop wallpaper based on the Resolution of the laptops to ensure that the wallpaper is perfectly maximize on the screen Please refer on the following steps on how we archive this by using PowerShell Script in Logon Script We will prepare to copy the …

Read morePowerShell-Desktop Wallpaper based on Resolution Size

Generate Random Password for Bulk Office 365 User Provision

Please refer to the following steps on how to we generate Random Password for bulk Office 365 User Provision rather than using the same password for all the newly provisioned Office 365 Users for first login due to security concern We will refer to the ASCII table (Refer to the Table below) to identify the …

Read moreGenerate Random Password for Bulk Office 365 User Provision

Update Windows Management Framework 5.0 on Windows 2012 R2

Please refer to the following tutorial on how to Update Windows Management Framework 5.0 on Windows 2012 R2 in my lab I would like to take advantage of the following new features in WMF5 Software Discovery, Install and Inventory with PackageManagement PowerShell Module Discovery, Install and Inventory with PowerShellGet PowerShell Script Discovery, Install and Management …

Read moreUpdate Windows Management Framework 5.0 on Windows 2012 R2