# encoding: ascii
# api: powershell
# title: PowerShell Talk Xen1
# description: The PowerShell Talk, Demo 1 – XenServer
# version: 0.1
# type: script
# author: Cody Bunch
# license: CC0
# x-poshcode-id: 1089
# x-archived: 2014-10-23T14:26:07
# x-published: 2009-05-10T14:54:00
#
#
#The PowerShell Talk
#Demo 1 - Hypervisors
#Xen!

#Connect to XenServer
Get-Credential | connect-Xenserver -Url http://XenServer_URL/sdk

#Create Our Network
Create-XenServer:Network -NameLabel "Test Network"

#Change it's description
Get-XenServer:Network -NameFilter "Test Network" | Set-XenServer:Network.NameDescription "This is the test network for the XenServer Demo"

#Destroy it
Get-XenServer:Network -NameFilter "Test Network" | Destroy-XenServer:Network
