PS Core | Disconnect VI Session

Steps to Disconnect VI Session with PowerCLI on PowerShell Core Login to vCenter with valid Username & Password #PowerCLI – PowerShell Core on Windows 10 #First Time Only Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false Set-PowerCLIConfiguration -ParticipateInCeip $true #Import VMware Module Import-Module VMware.VimAutomation.Core #Connect to vCenter $VC = “10.3.3.15” $Username = “administrator@vsphere.local” $PAssword = “P@ssw0rd01” Connect-VIServer -Server $VC …

Read morePS Core | Disconnect VI Session

Perform Automate Telnet Commands with PowerShell

Steps on how to perform automate telnet commands with PowerShell WASP (Windows Automation Snapin for PowerShell) Install Chocolatey Package Manager by following my previous post Install the WASP Module #Install wasp choco install wasp -y #Copy the following modules to Windows PowerShell Module Path copy-item C:\ProgramData\chocolatey\lib\wasp -Recurse -Destination C:\Windows\system32\WindowsPowerShell\v1.0\Modules copy-item C:\ProgramData\chocolatey\lib\autoload -Recurse -Destination C:\Windows\system32\WindowsPowerShell\v1.0\Modules copy-item …

Read morePerform Automate Telnet Commands with PowerShell

Install PowerShell 5.1 & Core on Windows 7

Refer to the steps below on how to install PowerShell 5.1 & Core on Windows 7 Verify the PowerShell version installed PS C:\Users\administrator> $PSVersionTable Name Value —- —– CLRVersion 2.0.50727.8800 BuildVersion 6.1.7601.17514 PSVersion 2.0 WSManStackVersion 2.0 PSCompatibleVersions {1.0, 2.0} SerializationVersion 1.1.0.1 PSRemotingProtocolVersion 2.1 Download and install Microsoft .NET Framework 4.5.2 Download and install PowerShell 5.1 …

Read moreInstall PowerShell 5.1 & Core on Windows 7

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