06-28-2015 04:23 PM - edited 03-01-2019 06:35 AM
Task Name | Create netApp Account |
Description | |
Prerequisites |
|
Category | Workflow |
Components | vSphere 5.x |
User Inputs |
Instructions for Regular Workflow Use:
Setting up a Windows 2008 R2 AD Server:
Administrative tools -> server manager
add role
In DOS Window run
dcpromo
Create a new forest
New Domain (baylor.local)
Set AD Admin Password
Installed Light Weight Directory services:
Installed .NET 4.5
Installed the UCSD PSA agent
Execute commands in a PS window:
Set-ExecutionPolicy unrestricted
Set-Item WSMan:\localhost\Client\TrustedHosts -Value "*" -Force
winrm quickconfig
The workflow:
The workflow execution:
The SR Variable resolution:
The Poweshell task to build the script:
The Powershell task to execute the script:
The SR Log Run:
Service Request ID: 5252
Workflow Inputs:
- VMName
Jun 28, 2015 22:59:25 UTC Request submitted
Jun 28, 2015 22:59:28 UTC Executing workflow item number 1
Jun 28, 2015 22:59:28 UTC Completed workflow item number 1, with status Completed
Jun 28, 2015 22:59:31 UTC Executing workflow item number 2
Jun 28, 2015 22:59:31 UTC Trigger context executeWorkFlowStep called
Jun 28, 2015 22:59:31 UTC Executing custom action BaylorPowerShellTest (Execute PowerShell Command)
Jun 28, 2015 22:59:31 UTC Executing custom action BaylorPowerShellTest (Execute PowerShell Command)
Jun 28, 2015 22:59:33 UTC Max wait time min milli seconds = 300000
Jun 28, 2015 22:59:34 UTC executor finished.....true
Jun 28, 2015 22:59:34 UTC Command Output: <?xml version='1.0'?><Objects />Command successful
Jun 28, 2015 22:59:34 UTC
Jun 28, 2015 22:59:34 UTC Command executed successfully.
Jun 28, 2015 22:59:34 UTC <?xml version='1.0'?><Objects />Command successful
Jun 28, 2015 22:59:36 UTC Task #1 (BaylorPowerShellTest (Execute PowerShell Command)) completed successfully in 4 seconds
Jun 28, 2015 22:59:36 UTC Input/Output values for Task #1 (BaylorPowerShellTest (Execute PowerShell Command)):
Jun 28, 2015 22:59:36 UTC [Local Input: Label = Power]
Jun 28, 2015 22:59:36 UTC [Local Input: PowerShell Agent = 172.17.32.106]
Jun 28, 2015 22:59:36 UTC [Local Input: Target Machine IP = 172.17.32.106]
Jun 28, 2015 22:59:36 UTC [Local Input: User ID = administrator]
Jun 28, 2015 22:59:36 UTC [Local Input: Password = **masked-value**]
Jun 28, 2015 22:59:36 UTC [Local Input: Domain = baylor.local]
Jun 28, 2015 22:59:36 UTC [Template Input:Commands/Script = echo 'Import-module activedirectory' > c:\\ad.ps1 echo 'New-ADComputer -Name ${VMName} -Path 'CN=Computers,DC=baylor,dc=local'' >> c:\\ad.ps1]
Jun 28, 2015 22:59:36 UTC [Resolved Template Input: Commands/Script = echo 'Import-module activedirectory' > c:\ad.ps1 echo 'New-ADComputer -Name b3 -Path 'CN=Computers,DC=baylor,dc=local'' >> c:\ad.ps1]
Jun 28, 2015 22:59:36 UTC [Local Input: Commands/Script = echo 'Import-module activedirectory' > c:\ad.ps1 echo 'New-ADComputer -Name b3 -Path 'CN=Computers,DC=baylor,dc=local'' >> c:\ad.ps1]
Jun 28, 2015 22:59:36 UTC [Local Input: Maximum Wait Time = 5]
Jun 28, 2015 22:59:36 UTC [Output: POWERSHELL_COMMAND_RESULT = <?xml version='1.0'?><Objects />Command successful]
Jun 28, 2015 22:59:36 UTC Completed workflow item number 2, with status Completed
Jun 28, 2015 22:59:37 UTC Executing workflow item number 3
Jun 28, 2015 22:59:37 UTC Trigger context executeWorkFlowStep called
Jun 28, 2015 22:59:37 UTC Executing custom action BaylorPowerShellTest (Execute PowerShell Command)
Jun 28, 2015 22:59:37 UTC Executing custom action BaylorPowerShellTest (Execute PowerShell Command)
Jun 28, 2015 22:59:40 UTC Max wait time min milli seconds = 300000
Jun 28, 2015 22:59:42 UTC executor finished.....true
Jun 28, 2015 22:59:42 UTC Command Output: <?xml version='1.0'?><Objects />Command successful
Jun 28, 2015 22:59:42 UTC
Jun 28, 2015 22:59:42 UTC Command executed successfully.
Jun 28, 2015 22:59:42 UTC <?xml version='1.0'?><Objects />Command successful
Jun 28, 2015 22:59:43 UTC Task #2 (BaylorPowerShellTest (Execute PowerShell Command)) completed successfully in 5 seconds
Jun 28, 2015 22:59:43 UTC Input/Output values for Task #2 (BaylorPowerShellTest (Execute PowerShell Command)):
Jun 28, 2015 22:59:43 UTC [Local Input: Label = Execute PowerShell]
Jun 28, 2015 22:59:43 UTC [Local Input: PowerShell Agent = 172.17.32.106]
Jun 28, 2015 22:59:43 UTC [Local Input: Target Machine IP = 172.17.32.106]
Jun 28, 2015 22:59:43 UTC [Local Input: User ID = administrator]
Jun 28, 2015 22:59:43 UTC [Local Input: Password = **masked-value**]
Jun 28, 2015 22:59:43 UTC [Local Input: Domain = baylor.local]
Jun 28, 2015 22:59:43 UTC [Local Input: Commands/Script = c:\\ad.ps1]
Jun 28, 2015 22:59:43 UTC [Local Input: Maximum Wait Time = 5]
Jun 28, 2015 22:59:43 UTC [Output: POWERSHELL_COMMAND_RESULT = <?xml version='1.0'?><Objects />Command successful]
Jun 28, 2015 22:59:43 UTC Completed workflow item number 3, with status Completed
Jun 28, 2015 22:59:43 UTC Executing workflow item number 4
Jun 28, 2015 22:59:43 UTC Completed workflow item number 4, with status Completed
The file that is created on the AD server:
The content of the file:
The Results:
Side notes:
See these articles for details on how to completely disable UAC:
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: