free the NETBIOS name - powershell

I need to configure Windows server 2019 several times on a single VM and promote it as a DC in a new forest in a domain name, for example "new.det". I am using a powershell script for this, and I have the following problem: after the first installation, I use the snapshot and run the script again on a clean VM, I get the error "NetBIOS name is already in use". How can I solve this problem if I don't want to change the NetBIOS name and any other settings? I can't figure out where the NetBIOS name information is stored. There is no other vms in domain or my network. Thanks in advance!

That was my fault, I set the server name and then tried to install ADDC with the server name as netbios for new domain. Therefore, there was a conflict.

Related

vncserver has wrong hostname

I had to change the name of the windows 7 system. Unaccountably, vncserver is still using the old computer name. This was RealVnc free version. I re-installed but it is still using the old computer name.
I had a Z400 motherboard go bad and it took the disk drive. I replaced the motherboard, $39 was cheap, and I cloned one of my other Z400 workstation C drives using Acronis. I booted the replacement motherboard with the cloned copy, changed its name to the old defective one, and activated windows. When It rebooted, vncserver still had the old computer name and I cannot get rid of it and it is conflicting with the vncserver on the other Z400 since they both use the same name. There is no option in the server to use a different name that I can find anywhere.
IPs are different and all system behave fine. I can ping and even access shares using their names. The problem system clearly shows the correct name but, unaccountably, vncserver is using the wrong name.
This system will be upgraded to 10 in a few days, maybe the problem will go away when that happens.
Solved! First I had to log in and reduce the number of clients to under 5 as that was my limit. Then I had to remove the problem system's leftover name. This was all done at realvnc web site. Once under 5 systems then I could add the problem one and once it connected to realvnc's cloud then it got the correct name. This was an artifact of having more then 5 systems when I was only licensed for 5. The "6th" one worked locally as its setup was still valid, but it was refused connection to the cloud so it never got to change its name. It "worked" until I did a flushdns and its old setup was no longer valid.

Windows 2012 name change Machine account didn't

I'm currently running into an issue where we changed over the name of a server (windows 2012). With the old name everything worked fine, after the name change it appears that the app pool identity is stuck with the old machine name in the machine account.
The site is using win auth to connect to our SQL server and provides an error:
LOGIN FAILED domainname\oldmachinename$
I notice when I change the app pool identity, the error changes, so it seems to be stuck with the old computer name, even though it's updated in local server data and control panel system properties.
How can I force the new name to be seen as the machine account?
I would remove the machine from the domain, change the hostname, re-join it to the domain, and that should alleviate the incorrect hostname issue.

NetBeans Localhost development

I have a php project which I want to test on localhost. I was suggested to use a no-ip domain name. I've done that and using this tutorial
and now I have a directory with a name same as the domain name on localhost. The project was previously connected a similar no-ip domain name(I wasn't present at that time) but then it expired and I'm setting it up again.
I have replaced every instance of the previous no-ip domain name in the code base with the no-ip domain name that I created and changed the project's Run Configurations in NetBeans but when I navigate to the domain name I don't see the obvious changes I've made in the development code.
When I test the connection it succeeds and when I save changes the Remote Log say that the changes have been saved and that the file has been received. When I navigate to localhost/shhasan.ddns.net I get a database error which points to Loader.php. I've checked Database.php and its the same setup which has worked before as the username, password, hostname is consistent with those on phypmyadmin. I've been stuck at this issue for 2 days now I would really appreciate help.
Your Loader.php is looking for a database/DB.php, but you only have a database.php.

Get the machine name of an Azure worker or web role using PowerShell?

Is there any way using the PowerShell Azure cmdlets to get the machine name on which an Azure worker or web role is running? Specifically, I'm looking for the name that starts with "RD". I'm not 100% sure if I'm searching for this using the right terminology, because my results are clouded with information about Azure Virtual Machines. I've also been exploring the objects returned from such calls as Get-AzureDeployment and Get-AzureVM, but haven't found the "RD" name anyplace yet.
I've also found the discussion here, but wondering if it's out of date: http://social.msdn.microsoft.com/Forums/windowsazure/en-US/73eb430a-abc7-4c15-98e7-a65308d15ed9/how-to-get-the-computer-name-of-a-webworker-role-instance?forum=windowsazuremanagement
Motivation: My New Relic monitoring often complains "server not reporting" for instances that have been decommissioned. New Relic's server monitoring knows only the "RD..." names, and I'm looking for a quick way to get a list of these from Azure so that I can compare and see if New Relic is only complaining about old instances or if there's a real problem with one of the current instances.
You can actually get more significant host names than RD... by setting the vmName key in the cloud service's ServiceConfiguration file.
Then, your host names will be of the form vmnameXX, where XX is the instance number of the role. (i.e. "MyApp01", "MyApp02", ...)
For details on this, see the links below:
https://azure.microsoft.com/documentation/articles/virtual-networks-viewing-and-modifying-hostnames/
http://blogs.msdn.com/b/cie/archive/2014/03/30/custom-hostname-for-windows-azure-paas-virtual-machines.aspx

Azure: Change VM name using Cmdlets

I erroneously named a virtual machine.
Using the Azure Powershell I am able to rename cloud services using Set-AzureService. There doesn't seem to be a Set-AzureVM command to rename virtual machines.
Is there another way to rename a virtual machine? I do not wish to change the VM's service name.
EDIT, further clarity:
I do NOT want to rename the cloud service name or the machine/computer name in the VM instance. I purely wish to change the associated name that my virtual machine is labeled with. i.e. the name you see in the portal
The names in the column with the red arrow:
Set-AzureService does not change service name! It only changes deployment name and description. These properties are just kind of Meta-Data associated with the hosted service deployment. You cannot change cloud service name (**cloudservice**.cloudapp.net) by any means! You can only create or delete cloud service.
And, not you can't change VM's name via Azure PowerShell cmdlets, but most probably you can do this by remote power shell to the targeted VM. Please note that renaming a Windows machine always requires restart!
For information on how to use Remote Power Shell on Azure VM, please check out this article.
UPDATE
I think what you need is the UpdateRole action on the management API. It has parameter RoleName which is desribed as:
RoleName
Required. Specifies the name for the virtual machine. The name must be unique within Windows Azure.
And the powershell cmdlet to use is: Update-AzureVM