Hi, Does anyone know why when i try i use this script to create a VM and to join the domain does it just create a VM but doesn't join it to the Domain.
$subscr="Visual Studio Premium with MSDN"$staccount="cam2"
$family="Windows Server 2012 R2 Datacenter"
$image=Get-AzureVMImage | where { $_.ImageFamily -eq $family } | sort PublishedDate -Descending | select -ExpandProperty ImageName -First 1
$vmname="NOV-04"
$vmsize="Medium"
$vm1=New-AzureVMConfig -Name $vmname -InstanceSize $vmsize -ImageName $image
$cred=Get-Credential -Message "Type the name and password of the local administrator account."
$vm1 | Add-AzureProvisioningConfig -Windows -AdminUsername "Novus" -Password "P@55w0rd"
$vm1 | Set-AzureSubnet -SubnetNames "Subnet-01"
$vm1 | Set-AzureStaticVNetIP -IPAddress 10.0.0.6
$disksize=20
$disklabel="DCData"
$lun=0
$hcaching="None"
$vm1 | Add-AzureDataDisk -CreateNew -DiskSizeInGB $disksize -DiskLabel $disklabel -LUN $lun -HostCaching $hcaching
$Domain = "CAM"
$DomainDNS = "Cam.Domain"
$DomainAdmin = "Novus"
$DomainPassword = "P@55w0rd"
$svcname="portalvhdszbwfkrpsbldff"
$vnetname="Novus"
New-AzureVM –ServiceName "Novusmsp" -VMs $vm1 -VNetName "Novus"