Netherlands: Software

Introductie Windows Server 2016

Issue link: http://hub-nl.insight.com/i/692748

Contents of this Issue

Navigation

Page 157 of 173

148 C H A P T E R 7 | Systems management ResourceId : SourceInfo : Attributes : {archive} Checksum : Contents : CreatedDate : 11/8/2014 1:40:50 PM Credential : DestinationPath : C:\inetpub\wwwroot\index.htm Ensure : present Force : MatchSource : ModifiedDate : 11/14/2014 7:09:02 AM Recurse : Size : 197 SourcePath : SubItems : Type : file PSComputerName : PowershellGet and NuGet The traditional way to install a Windows PowerShell module is to search for and find the module on the Internet and then download and install it. Windows Server 2016 Technical Preview changes the way modules are managed on a machine. It comes with the PowershellGet Windows PowerShell module built in. PowershellGet helps in finding, downloading, installing, and managing modules on a machine. PowershellGet works with multiple providers. These providers are client tools that connect to the module repository represented by Source (location - URI). The most important provider PowershellGet works with as of Windows Server 2016 Technical Preview is NuGet. NuGet is the package manager for Windows; it provides the ability to consume not only modules but also applications and packages. NuGet can work with multiple sources, and PSGallery is the most common and preferred repository source for PowershellGet. All the functionality for module management is included in the PowershellGet module. The first step for managing modules is to import the module into the Windows PowerShell console. Start Windows PowerShell Integrated Scripting Environment (ISE) and run the following command to load the PowershellGet module: PS C:\users\me>> import-module PowershellGet –Verbose VERBOSE: Loading module from path 'C:\Windows\system32\WindowsPowerShell\v1.0\Modules\PowershellGet\PowershellGet.psd1'. VERBOSE: Importing function 'Find-Module'. VERBOSE: Importing function 'Get-PSRepository'. VERBOSE: Importing function 'Install-Module'. VERBOSE: Importing function 'Publish-Module'. VERBOSE: Importing function 'Register-PSRepository'. VERBOSE: Importing function 'Set-PSRepository'. VERBOSE: Importing function 'Unregister-PSRepository'. VERBOSE: Importing function 'Update-Module'. VERBOSE: Importing variable 'PSGalleryPublishUri'. VERBOSE: Importing variable 'PSGallerySourceUri'. VERBOSE: Importing alias 'fimo'. VERBOSE: Importing alias 'inmo'. VERBOSE: Importing alias 'pumo'. VERBOSE: Importing alias 'upmo'. Using the Verbose switch with the Import-Module cmdlet displays all imported functions, cmdlets, and aliases on the console. There are eight functions, two variables, and four aliases available in this module. The first time you use the PowershellGet cmdlet, it verifies the installation of NuGet on the machine. If NuGet is not installed, a confirmation message box appears, as follows: PowershellGet requires NuGet_anycpu.exe to interact with NuGet-based galleries. NuGet_anycpu.exe must be available in 'C:\ProgramData\OneGet\ProviderAssemblies' or 'C:\Users\\AppData\Local\OneGet\ProviderAssemblies'. For more information about NuGet, see http://www.nuget.org. Do you want PowershellGet to download NuGet_anycpu.exe now?

Articles in this issue

Links on this page

Archives of this issue

view archives of Netherlands: Software - Introductie Windows Server 2016