How to configure WinRM for azure virtual machine in resource manager portal - virtual-machine

I have created a VM in azure resource manager portal using powershell. How to configure WinRM in VM for remote access using powershell. Thanks in advance.

This can be done by adding a custom script extension when deploying the VM. An example can be found here.
To add this to an existing VM, just copy the ConfigureWinRM.ps1, makecert.exe and winrmconf.cmd files from the same quickstart folder and execute the powershell script.

Related

Grab bash script from an storage account and install in a Linux VMSS

I have a bash script in an azure storage account and I want to call that script from an Azure VMSS, when a new version of the script is available. Is this possible?
Thanks
Custom Script Extension can be used to run the script in VMSS.
The Custom Script Extension downloads and executes scripts on Azure virtual machines. This extension is useful for post deployment configuration, software installation, or any other configuration or management tasks. Scripts can be downloaded from Azure storage or GitHub, or provided to the Azure portal at extension run time. The Custom Script Extension integrates with Azure Resource Manager templates, and can be run using the Azure CLI, PowerShell, Azure portal, or the Azure Virtual Machine REST API.
It can be called on Virtual Machine Scaleset using Add-AzVmssExtension

Azure ACI on Windows - How to access shared folder in container from on-premises and access Azure fileshare

i know that we can access azure file share from only the Linux Azure Container Instance. (not windows)
link here
So how can i access Azure file share from an Azure ACI of windows ?
Can i access a shared folder on Azure ACI container from on-premises windows machine ?Azure ACI has public IP address. So can we access like \IP Address\shareName ?
Please help
Q1. So how can I access Azure file share from an Azure ACI of windows ?
As you know, mounting an Azure Files share is currently restricted to Linux containers. So you cannot use this way to access the file share from the windows instance. I suggest you use the Azcopy to access the file share, in this way, you need to configure it yourself.
Q2. Can I access a shared folder on Azure ACI container from on-premises windows machine ?Azure ACI has public IP address. So can we access like \IP Address\shareName ?
For this question, you can configure the container instance as an NFS server, then you can access the NFS server in the way you knew before.

Why is MobileFirst Server Configuration Tool not letting me deploy with libertyAdminUser and libertyAdminPassword?

I'm trying to deploy a MobileFirst server to a local Liberty server configured with an LDAP server.
When I try and deploy my server configuration the admin task fails due to lack of attributes for connecting to Liberty.
BUILD FAILED
C:\Users\Administrator\Documents\IBM MobileFirst Platform Server Data\Server Configuration Tool\Configuration_Hello MobileFirst Server\Hello MobileFirst Server.xml:88: The element <installWorklightAdmin>, <jmx libertyAdminUser=".." libertyAdminPassword="..."/> is missing. A default user cannot be created for this server.
I have tried updating the server configuration file manually before deploying, but the server configuration tool is just saving over the changes.
How can I resolve this problem from within the Server Configuration Tool?
The Server Configuration Tool in MFP 7.0 can't be used to make an install on a Liberty server that is configured with LDAP.
In the simplified install process of the Server Configuration Tool, it automatically creates a Liberty Administrator in a basic registry and this is not possible if Liberty is configured with LDAP.
If you don't want to create ant files manually, you can:
Export the ant files that you created with the Server Configuration Tool (Menu File/Export Configuration as Ant files...)
Edit them so that they have the right attributes in the jmx element (you need to provide the login of password of a user that will be used as Liberty Administrator and that the apps will use to perform JMX calls)
Run the ant files as described here
For the admin: https://www-01.ibm.com/support/knowledgecenter/SSHS8R_7.0.0/com.ibm.worklight.installconfig.doc/install_config/r_wlconsole_ant_tasks.html
For the runtime: https://www-01.ibm.com/support/knowledgecenter/SSHS8R_7.0.0/com.ibm.worklight.deploy.doc/devref/c_project_war_file_ant_tasks.html
You may encrypt the password of the JMX user with the Liberty securityUtility program (in LibertyInstallDir/bin)

How to deploy a webapplication developed to a remotely running tomcat server?

I need to deploy a webapplication developed in my local system (used Eclipse) on a tomcat server running on a remote server. For this what all privilages are to be needed on the existing server.
What version of Tomcat are you using? You should just be able to go to manager screen and deploy your war file from there i.e. http://hostname:8080/manager
On Tomcat 7 you need to have a user entry in /conf/tomcat-users.xml for the role manager-gui.
If you can connect to the server hosting tomcat you could copy your war file to the webapps directory manually instead.
the easy way to deploy the application is to make a war file of your application and paste it in the webapps folder of tomcat installation folder. By default it catalina_home/webapps
or use the inbuilt hostmanager application.

Copy files to a remote server via RDP using a script

We have a couple production servers that are configured to only allow access via RDP. There are no acessible shares. The dev team have no say in changing this setup but we want to automate code deployments to these machines. Presently we have to set Remote Desktop to share a local drive with the server, then RDP to the server and manually copy the deployment.
Any one know of a way to tunnel over RDP and drop files to a given directory on the remote host from the command line? The instructions will need to be included in an MSBuild configuration.
If you can get WS-MAN set up, PowerShell remoting and/or pmodem might be your ticket? https://web.archive.org/web/20180429054125/http://www.nivot.org/blog/2009/11/default