Category: Powershell

Find Out DHCP Enabled Servers in Citrix Farm

09/05/08 | by Paullo [mail] | Categories: Presentation Server, Powershell

Suddenly I have an urge to change all DHCP enabled Citrix server to fixed IP addresses. Don’t laugh, in 2008, people still run server with DHCP on and the server is a Citrix Presentation Server. But we do, as these servers are in VM space and mainly for testing / development purpose.

Script 1: F_GetNetworkConfiguration.ps1

function DisplayNetworkConfiguration ($ServerName)

{
Write-Host $ServerName
Get-WmiObject -Class Win32_NetworkAdapterConfiguration -Filter IPEnabled=TRUE –ComputerName $ServerName
}

Script 2: GetCTXNetConf.ps1

. c:\source\scripts\powershell\F_GetNetworkConfiguration.ps1

$objFarm = New-Object -ComObject MetaFrameCOM.MetaFrameFarm
$objFarm.Initialize(1)
Write-Host $objFarm.FarmName

$objServers = $objFarm.Servers

# The following lists each server name and DHCP status
# The first line give more detais, while the second line
# gives only server name and DHCP status.

$objServers | ForEach-Object {DisplayNetworkConfiguration ($_.ServerName)}

$objServers | ForEach-Object {DisplayNetworkConfiguration ($_.ServerName)}|Select-Object -Property DHCPEnabled

Ozzy Citrix Noobs

Hi We call us Citrix Noobs, because we are noobs. We are a group of noobs that is heckless and restless. We are not fearing of anything, and we tend to do the best in daily noobing. Join us if you are also noobs, and will keep noobing.

September 2010
Mon Tue Wed Thu Fri Sat Sun
 << <   > >>
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30      

Misc

XML Feeds

What is RSS?

powered by b2evolution free blog software