Giter Site home page Giter Site logo

Comments (8)

RamanathanChinnappan-MSFT avatar RamanathanChinnappan-MSFT commented on July 26, 2024

@thiruma0203
I've delegated this to @mikefrobbins, a content author, to review and share their valuable insights.

from azure-docs-powershell.

mikefrobbins avatar mikefrobbins commented on July 26, 2024

@thiruma0203 I've added this suggestion as an idea for a future enhancement to our documentation.

from azure-docs-powershell.

vivuu1989 avatar vivuu1989 commented on July 26, 2024

Any solution on this? looking for a way to install azurepowerhell in Redhat 7.9 version offline where internet is not enabled.

from azure-docs-powershell.

mikefrobbins avatar mikefrobbins commented on July 26, 2024

@thiruma0203 and @vivuu1989, the steps to install the Az PowerShell module offline via the tar archive are:

These instructions work cross-platform on Windows, Linux, and macOS:

  1. Install PowerShell version 7.2 or higher
  2. Download the tar archive of the Az module from the Azure PowerShell source repo releases page.
  3. Copy the file to the offline system.
  4. Unblock the file if on Windows: Unblock-File -Path <file-path>
  5. Unarchive the tar file: tar zxf <tar-file-location> -C <destination-path>
  6. Run .<destination-path>/InstallModule.ps1 from PowerShell to install the Az module from the extracted files.

from azure-docs-powershell.

vivuu1989 avatar vivuu1989 commented on July 26, 2024

6. InstallModule.ps1

Didnt Work. (Redhat version 7.9, pwsh installed version 7.2.18)

getting the below error

./InstallModule.ps1: line 1: syntax error near unexpected token newline' '/InstallModule.ps1: line 1: <#

removed the comment session as well, but again throwing the error

./InstallModule.ps1: line 3: $'.\r': command not found
./InstallModule.ps1: line 17: $'\r': command not found
./InstallModule.ps1: line 18: syntax error near unexpected token $']\r'' '/InstallModule.ps1: line 18: [cmdletbinding()]

from azure-docs-powershell.

mikefrobbins avatar mikefrobbins commented on July 26, 2024
  1. InstallModule.ps1

Didnt Work. (Redhat version 7.9, pwsh installed version 7.2.18)

getting the below error

./InstallModule.ps1: line 1: syntax error near unexpected token newline' '/InstallModule.ps1: line 1: <#

removed the comment session as well, but again throwing the error

./InstallModule.ps1: line 3: $'.\r': command not found ./InstallModule.ps1: line 17: $'\r': command not found ./InstallModule.ps1: line 18: syntax error near unexpected token $']\r'' '/InstallModule.ps1: line 18: [cmdletbinding()]

You've launched PowerShell via pwsh, correct? I receive the same error when running ./InstallModule.ps1 from Bash.

from azure-docs-powershell.

vivuu1989 avatar vivuu1989 commented on July 26, 2024
  1. InstallModule.ps1

Didnt Work. (Redhat version 7.9, pwsh installed version 7.2.18)
getting the below error
./InstallModule.ps1: line 1: syntax error near unexpected token newline' '/InstallModule.ps1: line 1: <#
removed the comment session as well, but again throwing the error
./InstallModule.ps1: line 3: ′.\r′:commandnotfound./InstallModule.ps1:line17:'\r': command not found ./InstallModule.ps1: line 18: syntax error near unexpected token $']\r'' '/InstallModule.ps1: line 18: [cmdletbinding()]

You've launched PowerShell via pwsh, correct? I receive the same error when running ./InstallModule.ps1 from Bash.

Yes, I followed the instruction which you shared above and installed powershell in redhat machine using command
sudo yum install https://github.com/PowerShell/PowerShell/releases/download/v7.4.1/powershell-7.4.1-1.rh.x86_64.rpm
So the offline installation is not possible in Linux ?

from azure-docs-powershell.

mikefrobbins avatar mikefrobbins commented on July 26, 2024

Offline installation is possible on Linux. Example of offline installation on RHEL 8.9 using the previously provided instructions:

image

from azure-docs-powershell.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.