"net use" for Azure File Services fails depending on OS type - azure-storage

Anyone know why the below "net use" command gets varied results depending on the machine OS even though I am logged on as an admin in all cases? Fails or works based on the OS within PowerShell or Cmd whether the shell is run as Administrator or not. The share is setup in Azure File Services and can be accessed on my Win10 machine just fine using Azure PowerShell cmdlets.
# mount azure share as a drive
net use x: \\[myaccount].file.core.windows.net\davesdata /user:[myaccount] [my secondary key]
Runs fine on Server 2012
Gets “access denied” on Server 2008
Gets “path not found” on Windows 10

Azure File Storage supports the following Windows / SMB variants: Windows 7 SMB 2.1, Windows Server 2008 R2 SMB 2.1, Windows 8 SMB 3.0, Windows Server 2012 SMB 3.0, Windows Server 2012 R2 SMB 3.0 and Windows 10 SMB 3.0.
If you are connecting from a VM within the same Azure region you can connect using SMB 2.1 or SMB 3.0. If you are connecting from outside of the Azure region you need to ensure that Port 445 outbound is open. Many ISP's / corporate filewalls will block this. This wiki contains a list of ISP's that allow / disallow Port 445.

To map a drive to Azure File Storage from on-prem/outside the Azure region hosting it you need SMB 3.0 which comes with Windows 8/2012 or higher. For a machine inside Azure on the same Azure region you need SMB 2.0 or higher which comes with Windows 7/2008 or higher.
Definitely works on Windows 10 using the syntax you showed, double check for typos in the path/key or more detailed error messages in the event log. The mapped drive won't survive a reboot unless you persist the credentials.
cmdkey /add:storage_account_name.file.core.windows.net /user:storage_account_name /pass:storage_account_key

Port 445 was open on my router. It took me some time to find an additional option in the router: Netbios must be set to "allowed".
Then, Windows 10 works fine for me.

Related

Smartcard access on Windows Server

How do I access a smartcard that is locally attached to a Windows Server 2008R2 in a self written Windows service that is running on that server?
NB: I can access the same smartcard when I start the service as normal Windows 10 application from the command line.
You did not provide enough information about the problem you are experiencing but changing service identity to LocalService and not using RDP usually helps.

Hyper-V Server Core Guest OS Install

I am new to Hyper-V and Server Core but I am stumped as to how to install a guest OS from an ISO using only PowerShell.
I have downloaded the Hyper-V Server ISO and installed it on my server. It only installs Server Core and does not give me the option for a full GUI option. I configured its network settings, etc and all looks ok. So Server Core installed properly and Hyper-V feature is enabled. I can use PowerShell to create a VM with VHDX and link my Guest OS ISO to it. When I start the VM there is no console UI to install the OS.
How are you supposed to install a guest OS with no console interface to setup the OS?
Note, there is no option under this configuration to enable the OS GUI as some posts have suggested.
First, please don't confuse "Server Core" with "Hyper-V Server". "Server Core" is an installation mode of Windows. Among other things, it can be converted to GUI mode, which is why people keep telling you to just turn the GUI on. Hyper-V Server looks like Server Core but it is not Server Core.
For your actual problem, you're not going to find a simple out-of-the-box solution. You could work up a complete unattended installation process. You could set up a Windows Deployment Services server and have it install via PXE boot. I think some of the third-party Hyper-V management solutions allow you to connect to the console of a VM from within the local Hyper-V Server.
Hyper-V Server was designed with headless operation in mind. It was expected that you would use it to configure and perform maintenance on the management operating system and, if desired, the virtual machines as containers. The guest operating systems themselves were not really meant to be managed from within Hyper-V Server. What it's expected that you'll do is use a full GUI, whether another copy of Windows Server or a Windows desktop operating system running Remote Server Administration Tools to remotely connect to Hyper-V Server and manage its VMs.

Windows 8 Hyper-v - enable networking and remote connection

I have a vhd file, I need to enable networking and remote connection on it. On the vhd is installed Windows Server 2008 R2 and SharePoint development platform, VS 2010 ...
My laptop runs Windows 8 x64 Hyper-v. I can run the vhd into the hyper-v and works great, no problem. But I have no idea about hyper-v configuration and settings.
I want to desktop remote connect (from Windows 8) to the vhd file running Windows Server 2008 R2 (domain contoso.com) but I don't know how to configure the hyper-v to allow the network connection ... if I start the remote desktop connect on my Windows 8 and type the server name or domain\server ... it doen't work.
Any idea how to configure the hyper-v so I can have internet access in the VHD and connect to it using remote desktop connection?
I am guessing you are using a Wi-Fi connection on your laptop. Hyper-V does not automatically use wi-fi connections, since it's a server technology and all.
But there are ways - here's an article from a MS dude explaining how to use a switch to bridge your wi-fi.
http://blog.credera.com/topic/technology-solutions/microsoft-solutions/using-your-windows-8-wireless-connection-inside-hyper-v/

Testing LDAP Connections to Active Directory Server

I'm writing a Linux application that accesses a LDAP server (currently OpenLDAP).
I would like to also test the application with an Active Directory server since that might be used in production.
Is there any free demo or trial version from Microsoft that would allow me to run this test in a VM ?
Yes, you can download a evaluation copy of Windows Server 2008 R2. You have 180 days to do your evaluation. After you successfully install the Windows Server 2008 R2, you just click Windows button and type in "dcpromo". It will launch a wizard and guide you setting up the domain controller (i.e. the LDAP server + KDC)

Disk2vhd Hyper-V server question

Hello all I have a backed up about 30 servers using disk2vhd and now I have built my first of many hyper-v severs I did not realize this is all command line I did download CoreConfigurator and that does have some functionality I have been looking for. My question is how do I get the VHD files to run a Vitual Machines? its all command line I tried via vbs to mount the VHD's and I have not been able to any help on this would be great!
Thanks!
If you are using servercore, You maybe can do everything from the command line but I always prefer to have one computer running a Non server core version of windows 2008 to be the management server. You will load up Hyper-V manager on the non server core box and manage your Hyper-V server.
To have no "management" servers or desktops on your network will be a big pain IMO for management.
Using Hyper-V Manager you can quickly load the VHD's as VM's.
So load up Hyper-V Manager on a desktop PC on your localnet, and use its connect option to connect to your servercore. (Make sure your firewall settings are ok on servercore using coreconfig)