Solved

Microsoft Azure Powershell 3 Script

Posted on 2016-10-14
4
37 Views
Last Modified: 2016-10-14
Hello Experts,

Can someone please show me how to make Powershell 3.0 run the following commands when its activated?

set-executionpolicy -executionpolicy remotesigned

Install-Module AzureRM

Install-AzureRM

Import-AzureRM

Import-Module AzureRM.Compute

$env:PSModulePath = $env:PSModulePath + ";D:\Modules"

Get-Module -ListAvailable | ?{$_.path -match "D:\\Modules"} | Import-Module

Regards

cpatte7372
0
Comment
Question by:Member_2_7966113
  • 2
4 Comments
 
LVL 39

Expert Comment

by:Vasil Michev (MVP)
ID: 41843787
Put them in your profile? Here's an example article: http://exchangeserverpro.com/create-powershell-profile/
0
 
LVL 40

Accepted Solution

by:
Subsun earned 500 total points
ID: 41843794
You need to update your PowerShell profile for that..
In PowerShell console run $PROFILE, this will show you the profile path. Open that file and copy paste all command to that file and restart the PowerShell console..

Profile path may look like this, if the file is not there then create one..
C:\Users\<UserName>\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1

Set-executionpolicy -executionpolicy remotesigned this command you don't have to put it in profile, as this is a one time task.
0
 

Author Comment

by:Member_2_7966113
ID: 41843811
SubSun

Magic.

Thank you

Regards
0
 

Author Closing Comment

by:Member_2_7966113
ID: 41843812
Did the trick

Cheers
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Utilizing an array to gracefully append to a list of EmailAddresses
Most of the applications these days are on Cloud. Cloud is ubiquitous with many service providers in the market. Since it has many benefits such as cost reduction, software updates, remote access, disaster recovery and much more.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now