Your independent source for desktop virtualization, consumerization, and enterprise mobility management.
Sign in
|
Join
Desktop Virtualization
Consumerization
EMM
Forums
Videos
Podcasts
Books
Events
About Us
Discussion Forums
»
Tech Support Forums
»
Scripting / Automation
»
script problem
script problem, in the Scripting / Automation forum on BrianMadden.com
rated by 0 users
This post has 5 Replies | 0 Followers
Reply
Guest
Posted: Fri, Oct 14 2005 9:05 AM
rated by 0 users
Below is a script I am trying to use myself borrowed from the citrix site to remove a server from a pub app.
When I run it I get "If no parameters specified, quit and
' show the usage of the script"
Obviously I am not doing something, should I be replacing something in the script for my specific farm?
thanks
File: RemoveAppFromALLServers.wsf
Description: Exanmple of Remove App from all Servers .
Requirements: WSH 5.5 or higher.
Remove App from a All server .
CScript //nologo RemoveAppFromAllServers.wsf Applications/calc
Dim AppDN, theApp,Found
Found = false
'
' If no parameters specified, quit and
' show the usage of the script
'
if WScript.Arguments.Count
WScript.Echo "USAGE: RemoveAppFromAllServers.wsf AppDN "
WScript.Echo ""
WScript.Echo "Example: RemoveAppFromAllServers.wsf Applications/calc "
WScript.Quit 0
Else
AppDN = WScript.Arguments(0)
WScript.Echo "RemoveAppFromAllServers Application: " & AppDN
WScript.Echo ""
End If
'
' Create App object
'
Set theApp = CreateObject("MetaFrameCOM.MetaFrameApplication")
if Err.Number
WScript.Echo "Can't create MetaFrameApplication object"
WScript.Echo "(" & Err.Number & ") " & Err.Description
WScript.Echo ""
WScript.Quit Err.Number
End if
'
' Initialize the app object.
'
theApp.Initialize MetaFrameWinAppObject, AppDN
if Err.Number
WScript.Echo "Can't Initialize Application object"
WScript.Echo "(" & Err.Number & ") " & Err.Description
WScript.Echo ""
WScript.Quit Err.Number
End if
'You can add checking for whether App exists before .
'Load APP data
theApp.LoadData(1)
'
' Remove the Application from server.
'
theApp.RemoveAllServers()
if Err.Number
WScript.Echo "Can't Remove app from servers"
WScript.Echo "(" & Err.Number & ") " & Err.Description
WScript.Echo ""
WScript.Quit Err.Number
End if
'Saving data.
theApp.SaveData()
WScript.Echo "Removed App From All Servers successfully"
| Post Points: 5
Reply
Guest
replied on
Fri, Oct 14 2005 9:07 AM
rated by 0 users
also I notice some scripts are wsf and others are vbs, whats the difference , is one better than the other?
| Post Points: 5
Reply
Guest
replied on
Fri, Oct 14 2005 2:06 PM
rated by 0 users
Make sure you enter the AppDN parameter which specifies where the application is (in CMC)
Example
RemoveAppFromAllServers.wsf Applications/calc
| Post Points: 5
Reply
Guest
replied on
Mon, Oct 17 2005 10:01 AM
rated by 0 users
thanks
| Post Points: 5
Reply
Guest
replied on
Tue, Oct 18 2005 8:18 AM
rated by 0 users
still struggling with this,
tried it on notepad, so I changed it to
RemoveAppFromAllServers.wsf Applications/notepad but still doesnt work
just shows example
Am i supposed to replace AppDN with applications/notepad ?
| Post Points: 20
Points 95
Reply
Nat Foley
replied on
Tue, Nov 8 2005 6:42 AM
rated by 0 users
Try this script from Citrix4ge...
Citrix4ge
| Post Points: 5
Previous
|
Next
Page 1 of 1 (6 items) |
RSS
Copyright © 1997-2013 TechTarget |
Disclosures
|
Privacy Policy
|
Contact Info
BrianMadden.com
|
SearchVirtualDesktop.com
|
SearchEnterpriseDesktop.com
|
SearchServerVirtualization.com
|
SearchVMware.com