Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The term 'Get-InstalledModule' is not recognized as the name of a cmdlet #7

Open
dzbrody opened this issue Oct 22, 2018 · 11 comments
Open

Comments

@dzbrody
Copy link

dzbrody commented Oct 22, 2018

PowerShell_transcript.CARERELAY-BRODY.9yD90UfJ.20181022144109.txt
-HealthCare78109-2018-10-22-log.txt

Please see attached error codes

@jomolesk
Copy link
Contributor

@RajeevRangappa

@RajeevRangappa
Copy link
Contributor

@djbrody - Can you please tell the process on how are you installing the Power shell script ?

Thx
Rajeev

@dzbrody
Copy link
Author

dzbrody commented Oct 24, 2018

PS C:\Users\dan\Documents\GitHub\Health-Data\Deployment> .\deploy.ps1 -installModules
Initiating transcript to log session.
Transcript started, output file is C:\Users\dan\Documents\GitHub\Health-Data\Deployment\output\PowerShell_transcript.CARERELAY-BRODY.ggVbTZj4.20181024124839.txt

Log file created - C:\Users\dan\Documents\GitHub\Health-Data\Deployment\output-HealthCare082c0-2018-10-24-log.txt

2018-10-24 12:48:40 - Imported custom powershell modules (scripts\pshscripts\PshFunctions.ps1).

2018-10-24 12:48:40 - Trying to install listed modules..

Name Value


AzureAD 2.0.0.131
SqlServer 21.0.17199
AzureRM 4.4.0
MSOnline 1.1.166.0

2018-10-24 12:48:40 - Verifying module status AzureAD.
Get-InstalledModule : The term 'Get-InstalledModule' 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 C:\Users\dan\Documents\GitHub\Health-Data\Deployment\scripts\pshscripts\PshFunctions.ps1:176 char:27

  •                 if (!(Get-InstalledModule $module -ErrorAction Si ...
    
  •                       ~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (Get-InstalledModule:String) [], CommandNotFoundException
    • FullyQualifiedErrorId : CommandNotFoundException

PS C:\Users\dan\Documents\GitHub\Health-Data\Deployment>
-HealthCare082c0-2018-10-24-log.txt
PowerShell_transcript.CARERELAY-BRODY.ggVbTZj4.20181024124839.txt

Thanks
Dan

@RajeevRangappa
Copy link
Contributor

Dan,

I am not able to repro this error on myside.

Are you running powershell in admin mode ?

Did you get an option to install NuGet provider for PowerShell Scripts ? or do you have NuGet installed already ?

Thanks
Rajeev

@dzbrody
Copy link
Author

dzbrody commented Oct 24, 2018 via email

@RajeevRangappa
Copy link
Contributor

Hello Dan,
If you run as administrator then you should be good.

Sorry, i am not able to repro what are you seeing.

Thanks
Rajeev

@dzbrody
Copy link
Author

dzbrody commented Oct 25, 2018

https://github.com/Azure/Health-Data-and-AI-Blueprint this is where i am pulling the files from for a Repo

Thanks
Dan

@dzbrody
Copy link
Author

dzbrody commented Oct 25, 2018

I have added the GetNU exe
when back in and re downloaded the source from github
Opened powershell in admin ran
Import-AzurePublishSettingsFile -PublishSettingsFile publishsettings.xml
Get-AzureSubscription | Select SubscriptionName
Select-AzureSubscription -SubscriptionName "Development: BizSpark"
Get-AzureSubscription -Current

then

PS C:\Users\dan\Documents\GitHub\Health-Data> cd .\Deployment
PS C:\Users\dan\Documents\GitHub\Health-Data\Deployment> .\deploy.ps1 -installModules

Still get error see below

Security warning
Run only scripts that you trust. While scripts from the internet can be useful, this script can potentially harm your
computer. If you trust this script, use the Unblock-File cmdlet to allow the script to run without this warning
message. Do you want to run C:\Users\dan\Documents\GitHub\Health-Data\Deployment\scripts\pshscripts\PshFunctions.ps1?
[D] Do not run [R] Run once [S] Suspend [?] Help (default is "D"): r

Log file created - C:\Users\dan\Documents\GitHub\Health-Data\Deployment\output-HealthCare22356-2018-10-25-log.txt

2018-10-25 10:30:09 - Imported custom powershell modules (scripts\pshscripts\PshFunctions.ps1).

2018-10-25 10:30:09 - Trying to install listed modules..

Name Value


AzureAD 2.0.0.131
SqlServer 21.0.17199
AzureRM 4.4.0
MSOnline 1.1.166.0

2018-10-25 10:30:09 - Verifying module status AzureAD.
Get-InstalledModule : The term 'Get-InstalledModule' 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 C:\Users\dan\Documents\GitHub\Health-Data\Deployment\scripts\pshscripts\PshFunctions.ps1:176 char:27

  •                 if (!(Get-InstalledModule $module -ErrorAction Si ...
    
  •                       ~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : ObjectNotFound: (Get-InstalledModule:String) [], CommandNotFoundException
    • FullyQualifiedErrorId : CommandNotFoundException

PS C:\Users\dan\Documents\GitHub\Health-Data\Deployment>

@RajeevRangappa
Copy link
Contributor

Dan,

Are you using Bizspark account ? If yes, this script doesn't work on BizSpark subscription.

Thanks
Rajeev

@dzbrody
Copy link
Author

dzbrody commented Oct 26, 2018 via email

@RajeevRangappa
Copy link
Contributor

Hello Dan,

Sorry, Some of the services doesn't work on BizSpark account and Blueprint's doesn't support BizSpark accounts.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants