Skip to content

MSCloudIdUtils: throws error with scope currentuser #6

@roldengarm

Description

@roldengarm
install-module mscloudidutils -scope currentuser -force
install-mscloudidutilsmodule

Output:

PS C:\WINDOWS\system32> install-module mscloudidutils -scope currentuser -force
PS C:\WINDOWS\system32> install-mscloudidutilsmodule
Fixing Active Directory Authentication Library package directories ...
Not able to load ADAL assembly. Delete the Nugets folder under C:\Users\roland\Documents\WindowsPowerShell\Modules\MSCloudIdUtils , restart PowerShell session and try again ...
Removing existing module directory under  C:\Users\roland\Documents\WindowsPowerShell\Modules
Creating module directory under  C:\Users\roland\Documents\WindowsPowerShell\Modules
Active Directory Authentication Library Nuget doesn't exist. Downloading now ...
nuget.exe not found. Downloading from http://www.nuget.org/nuget.exe ...
Checking for updates from https://www.nuget.org/api/v2/.
Currently running NuGet.exe 2.8.6.
Updating NuGet.exe to 4.7.1.
Update successful.
Copy-Item : Cannot find path
'C:\Users\roland\Documents\WindowsPowerShell\Modules\MSCloudIdUtils\1.0.0.1\MSCloudIdUtils.psm1' because it does not
exist.
At C:\Users\roland\Documents\WindowsPowerShell\Modules\MSCloudIdUtils\1.0.0.1\MSCloudIdUtils.psm1:1290 char:5
+     Copy-Item "$PSScriptRoot\MSCloudIdUtils.psm1" -Destination $modul ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Users\roland...oudIdUtils.psm1:String) [Copy-Item], ItemNotFoundExce
   ption
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.CopyItemCommand

Import-Module : The specified module 'MSCloudIdUtils' was not loaded because no valid module file was found in any
module directory.
At C:\Users\roland\Documents\WindowsPowerShell\Modules\MSCloudIdUtils\1.0.0.1\MSCloudIdUtils.psm1:1292 char:5
+     Import-Module MSCloudIdUtils
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (MSCloudIdUtils:String) [Import-Module], FileNotFoundException
    + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand

I'm not a local admin on the box I want to run this on, so I cannot use global scope.
It does work in the end, but I want to avoid errors as then my script will break.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions