|
2 | 2 | description: Use this topic to help manage Windows and Windows Server technologies with Windows PowerShell.
|
3 | 3 | external help file: Microsoft.FailoverClusters.PowerShell.dll-Help.xml
|
4 | 4 | Module Name: FailoverClusters
|
5 |
| -ms.date: 10/21/2022 |
| 5 | +ms.date: 11/22/2022 |
6 | 6 | online version: https://learn.microsoft.com/powershell/module/failoverclusters/add-clustergenericapplicationrole?view=windowsserver2022-ps&wt.mc_id=ps-gethelp
|
7 | 7 | schema: 2.0.0
|
8 | 8 | title: Add-ClusterGenericApplicationRole
|
@@ -40,38 +40,36 @@ If so, then it is presumed to be online and will not be restarted or failed over
|
40 | 40 |
|
41 | 41 | ### Example 1: Configure an application as a generic clustered application
|
42 | 42 |
|
43 |
| -``` |
44 |
| -PS C:\> Add-ClusterGenericApplicationRole -CommandLine NewApplication.exe |
45 |
| -Name OwnerNode State |
46 |
| ----- --------- ----- |
47 |
| -cluster1GenApp node2 Online |
| 43 | +```powershell |
| 44 | +Add-ClusterGenericApplicationRole -CommandLine NewApplication.exe |
48 | 45 | ```
|
49 | 46 |
|
50 |
| -This example configures NewApplication.exe as a generic clustered application. A default name will |
51 |
| -be used for client access and this application requires no storage. |
| 47 | +This example configures `NewApplication.exe` as a generic clustered application. |
| 48 | +A default name will be used for client access and this application requires no storage. |
52 | 49 |
|
53 | 50 | ### Example 2: Configure an application with storage and name
|
54 | 51 |
|
55 |
| -``` |
56 |
| -PS C:\> Add-ClusterGenericApplicationRole -CommandLine NewApplication.exe -Storage "Cluster Disk 4" -Name NewApplication |
57 |
| -Name OwnerNode State |
58 |
| ----- --------- ----- |
59 |
| -NewApplication node2 Online |
| 52 | +```powershell |
| 53 | +$parameters = @{ |
| 54 | + CommandLine = 'NewApplication.exe' |
| 55 | + Storage = 'Cluster Disk 4' |
| 56 | + Name = 'NewApplication' |
| 57 | +} |
| 58 | +Add-ClusterGenericApplicationRole @parameters |
60 | 59 | ```
|
61 | 60 |
|
62 |
| -This example configures NewApplication.exe as a generic clustered application using Cluster Disk 4, |
63 |
| -and assigns the name NewApplication. |
| 61 | +This example configures `NewApplication.exe` as a generic clustered application using Cluster Disk 4, |
| 62 | +and assigns the name NewApplication. This example uses splatting to pass parameter values from the |
| 63 | +`$Parameters` variable to the command. Learn more about |
| 64 | +[Splatting](/powershell/module/microsoft.powershell.core/about/about_splatting). |
64 | 65 |
|
65 | 66 | ### Example 3: Configure application with no wait for resources
|
66 | 67 |
|
67 |
| -``` |
68 |
| -PS C:\> Add-ClusterGenericApplicationRole -CommandLine NewApplication.exe -Wait 0 |
69 |
| -Name OwnerNode State |
70 |
| ----- --------- ----- |
71 |
| -cluster1GenApp node2 Pending |
| 68 | +```powershell |
| 69 | +Add-ClusterGenericApplicationRole -CommandLine NewApplication.exe -Wait 0 |
72 | 70 | ```
|
73 | 71 |
|
74 |
| -This example configures NewApplication.exe as a generic clustered application and assigns the name |
| 72 | +This example configures `NewApplication.exe` as a generic clustered application and assigns the name |
75 | 73 | NewApplication. The cmdlet completes without waiting for all resources to come online.
|
76 | 74 |
|
77 | 75 | ## PARAMETERS
|
|
0 commit comments