Quantcast
Channel: VMware Communities : Discussion List - vRealize Orchestrator
Viewing all articles
Browse latest Browse all 6251

Help with a script. Need hostname, not the FQDN

$
0
0

I am trying to pull a workflow together which will create a user in Active directory, and then install SQL server using that account for the service.

 

the format of the username I want is SQL_servername

 

I am using "hostname = vm.guest.guestId;" to pull out the hostname from the VM, but it returns the FQDN (i.e. servername.domain.name)

I have tried various methods (rtrim, trim, righttrim etc) to remove the domain name to leave me with just the server name but non seem to work.

Is there a way in Orchestrator to remove tthe domain name, or is there another function I should be using to get the short servername/

 

Thanks


Viewing all articles
Browse latest Browse all 6251

Trending Articles