Azure-Samples / azure-files-samples

This repository contains supporting code (PowerShell modules/scripts, ARM templates, etc.) for deploying, configuring, and using Azure Files.
https://docs.microsoft.com/azure/storage/files/storage-files-introduction
MIT License
235 stars 195 forks source link

AzFilesHybrid.zip. what to do after unzipping? #122

Open jpsebasti opened 2 years ago

jpsebasti commented 2 years ago

I see no installation instructions. Please don't assume that everyone knows. Provide further instructions. I downloaded the AzFilesHybrid.zip and unzipped it. Now I've got the three files CopyToPSPath.ps1, AzFilesHybrid.psd1 and AzFilesHybrid.psm1.

I need to get these into my pwsh environment on my Mac. Clueless here what is next. Nothing that I can see in the download to indicate what to do.

jpsebasti commented 2 years ago

I did some internet searching (which I shouldn't have to do) to find out what to do next. I saw a reference to running the CopyToPSPath.ps1. I ran: $ pwsh CopyToPSPAth.ps1. It returned nothing, just the command prompt.

A tree command on my Mac from ~/.local/share/powershell shows the AzFilesHybrid.psd1 and AzFilesHybrid.psm1 files deep down the directory tree below the Modules: sub-directory. No idea if this is correct or not.

├── Modules: │   └── usr │   └── local │   └── share │   └── powershell │   └── Modules: │   └── usr │   └── local │   └── microsoft │   └── powershell │   └── 7 │   └── Modules │   └── AzFilesHybrid │   └── 0.2.4.0 │   ├── AzFilesHybrid.psd1 │   └── AzFilesHybrid.psm1

I assume at that point, I should be able to import the module however this is what I get: $ PS /Users/jsebast> import-module AzFilesHybrid Import-Module: The specified module 'AzFilesHybrid' was not loaded because no valid module file was found in any module directory.

Can someone help?