I am using Ubuntu 16.04 with an elevated PS shell. The appropriate version of PowershellGet is installed.
https://learn.microsoft.com/en-us/powershell/azure/install-azurerm-ps?view=azurermps-4.1.0
When trying to follow the above directions I receive this error below:
PackageManagement\Install-Package : Package 'AzureRM.profile' failed to be installed because: /tmp/1323106488/AzureRM.profile/AzureRM.profile.nuspec At /opt/microsoft/powershell/6.0.0alpha.14/Modules/PowerShellGet/1.1.2.0/PSModule.psm1:1809 char:21 + ... $null = PackageManagement\Install-Package #PSBoundParameters + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidResult: (AzureRM.profile:String) [Install-Package], Exception + FullyQualifiedErrorId : Package '{0}' failed to be installed because: {1},Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage
Did I miss a step?
basically you are applying a windows tutorial to a ubuntu box and wondering why that doesn't work...
Install-Package -Name AzureRM.NetCore.Preview -Source https://www.powershellgallery.com/api/v2 -ProviderName NuGet -ExcludeVersion -Destination <Folder you want this to be installed>
you can follow this article to install AzureRM.Profile and AzureRm.Resources (i think those are the only ones ported as of now).
There was an experimental docker image with some other modules laying around, I can't seem to find it now
docker run -it twitchax/azure-powershell-core
here you are; this one has:
AzureRM.Compute.Netcore
AzureRM.Network.Netcore
AzureRM.Profile.Netcore
AzureRM.Resources.Netcore
AzureRM.Storage.Netcore
AzureRM.Tags.Netcore
AzureRM.Websites.Netcore
Related
I am new to Sharepoint, but I need to get a list of files from my Sharepoint site and determine who created the file. Is there a way to do this? I have been looking online for the last couple of hours and found some Power shell scripts. But when I run them I get errors.
First thing I did was install Microsoft.Online.Sharepoint.Powershell
I ran the script :
Get-Module -Name Microsoft.Online.SharePoint.PowerShell -ListAvailable | Select Name,Version
I got
Name Version
Microsoft.Online.SharePoint.PowerShell 16.0.21909.0
So it looks like I installed it correctly.
I ran the script
Install-Module -Name Microsoft.Online.SharePoint.PowerShell
I got the error
Install-Module : The 'Install-Module' command was found in the module 'PowerShellGet', but the module could not be
loaded. For more information, run 'Import-Module PowerShellGet'.
At line:1 char:1
Install-Module -Name Microsoft.Online.SharePoint.PowerShell
+ CategoryInfo : ObjectNotFound: (Install-Module:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CouldNotAutoloadMatchingModule
Is there something else I need to load ? Or this is the wrong direction to get the information?
You could run the following Powershell commands: Set-ExecutionPolicy Unrestricted then try to run Install-Module -Name Microsoft.Online.SharePoint.PowerShell again.
For Reference: Set-ExecutionPolicy.
What if there is problem in setting virtual environment, if we start working without setting it what are the cons for that.
PS C:\Users\USER\flaask\enrollment> py -m venv venv
PS C:\Users\USER\flaask\enrollment> venv\scripts\activate
venv\scripts\activate : File C:\Users\USER\flaask\enrollment\venv\scripts\Activate.ps1 cannot be loaded because running scripts is
disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ venv\scripts\activate
+ ~~~~~~~~~~~~~~~~~~~~~
+ FullyQualifiedErrorId : UnauthorizedAccess
Description
Hi We need to deploy a TCP server with a "different known" port so we selected an azure cloud service. My team has different OS so we need to deploy with powershell code. We also enabled the "Enable-AzureRmAlias" command to avoid errors. In both operating systems we got the same error.
The term 'New-AzureServiceProject' is not recognized as the name of a cmdlet
Steps to reproduce
We tried the same steps in MACOS and a windows 7 machine and followed the azure tutorial:
https://learn.microsoft.com/en-us/azure/cloud-services/cloud-services-nodejs-develop-deploy-express-app
Everything works fine until the New-AzureServiceProject expressapp command.
Environment data
In both machines we got:
$PSVersionTable.PSVersion
Major Minor Patch PreReleaseLabel BuildLabel
6 2 1
Get-InstalledModule -Name Az -AllVersions | select Name,Version
Name Version
Az 2.4.0 Az 2.3.2
az --version
azure-cli 2.0.67 *
Error output
New-AzureServiceProject : The term 'New-AzureServiceProject' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ New-AzureServiceProject helloworld
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (New-AzureServiceProject:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
New-AzureServiceProject is using the Azure module, this command is working well on my windows 10. I have PSVersion 5.1.17763.503.
To avoid this, you must make sure that you've got the Azure module 5.3.0+ install and NO other older version. Once that's installed, force installs the Az module again. You could follow this to migrate existing scripts to Az and more details from this SO question about Az / AzureRM / Legacy Azure Powershell Conflicts
What is the easiest way to export an Azure App Service Certificate on Mac?
All results seem to point to Powershell - I have attempted to install Powershell on Mac via PowerShell Core, though I have experienced a large amount of authentication issues, namely with the Connect-AzureRmAccount command:
Connect-AzureRmAccount : Object reference not set to an instance of an object.
At line:1 char:1
+ Connect-AzureRmAccount
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Connect-AzureRmAccount], NullReferenceException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Profile.ConnectAzureRmAccountCommand
Help would be appreciated.
Answering my own question.
1. Install Powershell with brew:
brew cask install powershell
2. Verify that your install is working properly:
pwsh
3. Execute the powershell script found here: https://blogs.msdn.microsoft.com/benjaminperkins/2017/04/12/export-an-azure-app-service-certificate-pfx-powershell/
I tried the following methods all of which have failed
Running the .msi installer via the GUI from the Node site (no option given for running as admin)
Running the .msi installer via comandline as admin
Running choclatey installer as admin
Here is the choclatey output as seen in the log
Downloading nodejs.install 64 bit
from 'https://nodejs.org/dist/v5.10.1/node-v5.10.1-x64.msi'
Installing nodejs.install...
[ERROR] Running msiexec with /i "C:\Users\user1\AppData\Local\Temp\chocolatey\nodejs.install\5.10.1\nodejs.installInstall.msi" /quiet was not successful. Exit code was '1603' Error Mess
age:
.
At C:\ProgramData\chocolatey\helpers\functions\Start-ChocolateyProcessAsAdmin.ps1:92 char:10
+ throw <<<< $errorMessage
+ CategoryInfo : OperationStopped: ([ERROR] Running...or Message:
.:String) [], RuntimeException
+ FullyQualifiedErrorId : [ERROR] Running msiexec with /i "C:\Users\tcastonzo\AppData\Local\Temp\chocolatey\nodejs.install\5.10.1\nodejs.installInstall.msi" /quiet was not successful.
Exit code was '1603' Error Message:
.
The install of nodejs.install was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\nodejs.install\tools\chocolateyInstall.ps1'.
See log for details.
Chocolatey installed 0/1 package(s). 1 package(s) failed.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
Failures:
- nodejs.install
PS C:\GitProjects\reporting> choco install nodejs.install
Installing the following packages:
nodejs.install
By installing you accept licenses for the packages.
I had same problem with Win-7 with node-v6.10.3-x64.msi and node-v6.10.3-x86.msi installers.
Solution:
Download the Zipped version; When extracting, note the file that causes error.
Then, using Explorer, drill down to the target folder, created an empty file, then copy the content of archived file into the new, empty file.
I think the FQ path to destination is too long. Following is the error message I received.
! C:\Users\......\Downloads\node-v6.10.3-win-x64.zip: Cannot create node-v6.10.3-win-x64\node_modules\npm\node_modules\npm-registry-client\node_modules\npmlog\node_modules\gauge\node_modules\string-width\node_modules\is-fullwidth-code-point\node_modules\number-is-nan\package.json
! The system cannot find the path specified.
Since support for windows 7 ended for Nodejs .I found the manual installment easier.
see this comment from github: https://github.com/nodejs/node/issues/33000#issuecomment-644530517
Do follow the same steps with the binary zip file from : here
I the exact same error in Windows 10.
After launched my shell, making sure I was running as administrator, it worked.