PowerShell Logo Small

Add-ClusterGenericScriptRole



This is the built-in help made by Microsoft for the command 'Add-ClusterGenericScriptRole', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Configures an application controlled by a script that runs in Windows Script Host, within a failover cluster.

SYNTAX


Add-ClusterGenericScriptRole [[-Name] <String>] [-Cluster <String>] [-IgnoreNetwork <StringCollection>] [-InputObject <PSObject>] [-StaticAddress <StringCollection>]
[-Storage <StringCollection>] [-Wait <Int32>] -ScriptFilePath <String> [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Add-ClusterGenericScriptRole cmdlet configures an application controlled by a script that runs in Windows Script Host, within a failover cluster.


The script provides the cluster software with information about the current state of the application. As needed, the cluster software will restart or fail over the script
(and through it, the application will be restarted or failed over).


Note: This cmdlet cannot be run remotely without Credential Security Service Provider (CredSSP) authentication on the server computer.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkId=321008
Add-ClusterGenericApplicationRole
Add-ClusterGenericServiceRole
Get-ClusterGroup
Move-ClusterGroup
Remove-ClusterGroup
Start-ClusterGroup
Stop-ClusterGroup

REMARKS

<

Examples


Example 1

PS C:\>Add-ClusterGenericScriptRole -ScriptFilePath script1.vbs
Name OwnerNode State
---- --------- -----
cluster1GenScript node2 Online



This example configures the script named script1.vbs to run within a failover cluster, using defaults for the name and IP address, and does not assign a disk.




Example 2

PS C:\>Add-ClusterGenericScriptRole -ScriptFilePath script1.vbs -Storage "Cluster Disk 4" -Name script1
Name OwnerNode State
---- --------- -----
script1 node2 Online



This example configures the script named script1.vbs to run within a failover cluster and use Cluster Disk 4. The cmdlet assigns the clustered script the name script1.




Example 3

PS C:\>Add-ClusterGenericScriptRole -ScriptFilePath script1.vbs -Wait 0
Name OwnerNode State
---- --------- -----
cluster1GenScript node2 Pending



This example configures the script called script1.vbs to run within a failover cluster, using defaults for the name and IP address, and does not assign a disk. The cmdlet
completes without waiting for all resources to come online.