Categories
Azure Stack AzureStack DevOps Microsoft

Creating Azure Stack Tenant Offer via PowerShell

When you start working with Microsoft Azure Stack you can automate a lot of the configuration via PowerShell. This quick video and script will help you create Tenant Offers via PowerShell.      

Categories
Exchange Lync VMware

Automated Creation of VMware PortGroups

I was working on creating a new lab environment for Exchange 2013 and Lync 2013. I decide to create a couple of new portgroups with VLANs on all the ESXi servers. the task was going to be repeated 30 times so I decided to spend a little time creating a script to automate the process of […]

Categories
Active Directory PowerShell

Active Directory Auto-Replication Script

While working in my lab I found that my replication between sites was not working as fast as I needed. So I created a script to trigger the repadmin command every 5 minutes. Create Auto-Replication.ps1 file Open Notepad or your favorite powershell editor Type this line: 1..2094|foreach {start-sleep -s 5;cmd /c repadmin /syncall /AeP} Save […]

Categories
Exchange PowerShell

Exchange Management Shell for Windows 2012 Server Core

While working with my new Exchange 2013 environment. I decided to remove the GUI to reduce the load. And after the reboot I lost my Exchange Management Shell. I can still access the new Exchange Admin Center via the web address https://servername.domain.com/ecp but now I cannot run any scripts via the Exchange Management Shell. Here […]

Categories
Exchange PowerShell Windows

Installation of Exchange 2013

Microsoft release Exchange 2013 Preview last week. Here are some notes from my first installation. Active Directory The current version of Exchange 2013 do not support upgrade from Previous versions. This feature will be added later. A new AD forest was created with Windows Server 2012 core. (Instructions) OS Installation The Exchange environment was build […]

Categories
Firewall PowerShell Windows

Get a list of the Windows Server 2012 Firewall Rules

Here is a quick way to get a report for the Windows Firewall rules in Windows Server 2012. Enabled Firewall Rules Get-NetFirewallRule | Where-Object {$_.Action -eq “Allow”} | Format-Table -Property DisplayName Disabled Firewall Rules Get-NetFirewallRule | Where-Object {$_.Enabled -eq “False”} | Format-Table -Property Displayname

Categories
PowerShell Windows

Replace Diskpart with PowerShell

In the new world of Powershell you can replace many of the command line utilities used by Windows Administrators. Here is a way to replace Diskpart with PowerShell commands. 1. Check if the initiator can see the disk: Get-disk 2. Select the disk to bring disk  online: Set-disk –number 3 –IsOffline $False 3. Make disk […]

Categories
Active Directory PowerShell Windows

Detect Slow Network Link for Windows GPO Processing

When a user login to a computer they want to log in as soon as posible. If the user logon time is slow, it may be an indication that something is wrong with the computer or network. Microsoft Windows 7/2008(R2) has an algorithm called NLA that calculates if a computer is on a slow network […]

Categories
End User Exchange PowerShell

Send Mail from PowerShell

Working with PowerShell the next step is to enable additional features in my scripts.  This script will  send email directly from within PowerShell. Hope this helps someone. [sourcecode language=”css”] ################################################# # Name: SMTPAnonTest.ps1 # # Author: Carlos Vargas # # Email: cvargas at cavarpe dot com # # Version: 1.0 # # Purpose: Test Anonymous Relay # […]

Categories
PowerShell VMware

vSphere Inventory Import Script

Someone ask me how to import VM’s from a list.  Here is a simple script to import VM’s based on a list. The script uses a single datastore. [sourcecode languange=”css”] ############################################# # Script Name: Importvms.ps1 # # Author Name: Carlos Vargas # # Version : 1.0 # # Contact : cavarpe.wordpress.com # ############################################# # Requirements […]