Netherlands: Software

Introductie Windows Server 2016

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

Contents of this Issue

Navigation

Page 160 of 173

151 C H A P T E R 7 | Systems management However, running the Find-Module cmdlet with Bing as the value for the Name parameter and 5.0 as the value for the RequiredVersion parameter results in output with details about the Bing module. PS C:\Users\me> Find-Module -Name "Bing" -RequiredVersion "5.0" Repository Version Name Description ---------- ------- ---- ----------- PSGallery 5.0 Bing A few functions for working with the new Bing APIs After finding the relevant modules, the next step is to install the module. PowershellGet provides the Install-Module cmdlet specifically for this purpose. This cmdlet is very similar to Find-Module. It also takes Name, RequiredVersion, and MinimumVersion as parameters. The code block that follows demonstrates running Install-Module with the Name parameter and the Verbose switch. You can use MinimumVersion or RequiredVersion along with the Name parameter. Notice that the last line in the output suggests that module is installed. Also, note that the modules are downloaded by default at the $env:ProgramFiles\WindowsPowershell\Modules folder location. Windows PowerShell uses this folder location to install modules. PS C:\Users\me> Install-Module -Name bing -Verbose VERBOSE: In PSModule Provider - 'Get-DynamicOptions'. VERBOSE: In PSModule Provider - 'Get-DynamicOptions'. VERBOSE: In PSModule Provider - 'Get-DynamicOptions'. VERBOSE: In PSModule Provider - 'Get-DynamicOptions'. VERBOSE: In PSModule Provider - 'Find-Package'. VERBOSE: OPTION: MessageResolver => Microsoft.PowerShell.OneGet.CmdLets.GetMessageString VERBOSE: OPTION: ProviderName => PSModule VERBOSE: OPTION: Verbose => True VERBOSE: OPTION: Name => bing VERBOSE: The -Repository parameter was not specified. PowerShellGet will use all of the registered repositories. VERBOSE: Getting the provider object for the OneGet Provider 'NuGet'. VERBOSE: The specified Location is 'http://www.microsoft.com/' and OneGetProvider is 'NuGet'. VERBOSE: Calling 'NuGet::FindPackage' VERBOSE: Calling 'CommonServiceProvider::GetKnownFolder' VERBOSE: Getting the provider object for the OneGet Provider 'NuGet'. VERBOSE: The specified Location is 'https://www.powershellgallery.com/api/v2/' and OneGetProvider is 'NuGet'. VERBOSE: Calling 'NuGet::FindPackage' VERBOSE: Calling 'CommonServiceProvider::GetKnownFolder' VERBOSE: Performing the operation "" on target "Version '5.0' of module 'Bing'". VERBOSE: In PSModule Provider - 'Install-Package'. VERBOSE: The FastPackageReference is 'NuGet|Bing|5.0|https://www.powershellgallery.com/api/v2/'. VERBOSE: OPTION: MessageResolver => Microsoft.PowerShell.OneGet.CmdLets.GetMessageString VERBOSE: OPTION: ProviderName => PSModule VERBOSE: OPTION: Verbose => True VERBOSE: OPTION: Name => bing VERBOSE: Version '5.0' of module 'Bing' is already installed at 'C:\Program Files\WindowsPowerShell\Modules\Bing'. At this point, you can use the Bing module by importing it into the current Windows PowerShell runspace by using the Import-Module cmdlet. After the initial installation, running Update-Module updates the existing modules. This module takes the Name and RequiredVersion parameters, but it does not take the MinimumVersion parameter, as shown here: PS C:\Users\me> Update-Module -Name Bing PS C:\Users\me> Update-Module -Name "Bing" -RequiredVersion "5.0" There is also a Publish-Module cmdlet for adding newer modules to the repository. System Center 2016 By John McCabe Just like Windows Server, System Center gets an updated edition, too. In this section, we will detail what is new for System Center 2016. The core focus of System Center 2016 is on hybrid management—how can we manage the cloud natively from System Center, but also how can we use the cloud to extend the functionality of system center or manage the environment from the cloud.

Articles in this issue

Archives of this issue

view archives of Netherlands: Software - Introductie Windows Server 2016