none
Missing Containers Cmdlet RRS feed

  • Question

  • I created the new Server Core (Windows 2016). I can't find the all container cmdlet in powershell. I did Uninstall/installed the containers feature but still missing all cmdlet. How do i get containers cmdlet in powershell?

    Here is my server info.

    WindowsBuildLabEx                                       : 16299.15.amd64fre.rs3_release.170928-1534
    WindowsCurrentVersion                                   : 6.3
    WindowsEditionId                                        : ServerDatacenterACor
    WindowsInstallationType                                 : Server Core
    WindowsInstallDateFromRegistry                          : 28/4/2018 12:41:19 PM
    WindowsProductId                                        : 00395-60000-00001-AA842
    WindowsProductName                                      : Windows Server Datacenter
    WindowsRegisteredOrganization                           : 
    WindowsRegisteredOwner                                  : Windows User
    WindowsSystemRoot                                       : C:\Windows
    WindowsVersion                                          : 1709
    BiosCharacteristics                                     : {3, 9, 15, 16...}
    BiosBIOSVersion                                         : {VRTUAL - 1, Hyper-V UEFI Release v2.5, Microsoft - 100032}
    BiosBuildNumber                                         : 
    BiosCaption                                             : Hyper-V UEFI Release v2.5
    BiosCodeSet                                             : 
    BiosCurrentLanguage                                     : 
    BiosDescription                                         : Hyper-V UEFI Release v2.5
    BiosEmbeddedControllerMajorVersion                      : 255
    BiosEmbeddedControllerMinorVersion                      : 255
    BiosFirmwareType                                        : Uefi
    BiosIdentificationCode                                  : 
    BiosInstallableLanguages                                : 
    BiosInstallDate                                         : 
    BiosLanguageEdition                                     : 
    BiosListOfLanguages                                     : 
    BiosManufacturer                                        : Microsoft Corporation
    BiosName                                                : Hyper-V UEFI Release v2.5
    BiosOtherTargetOS                                       : 
    BiosPrimaryBIOS                                         : True
    BiosReleaseDate                                         : 22/8/2017 8:00:00 AM
    BiosSeralNumber                                         : 8355-6248-8581-2148-3845-5374-58
    BiosSMBIOSBIOSVersion                                   : Hyper-V UEFI Release v2.5
    BiosSMBIOSMajorVersion                                  : 2
    BiosSMBIOSMinorVersion                                  : 4
    BiosSMBIOSPresent                                       : True
    BiosSoftwareElementState                                : Running
    BiosStatus                                              : OK
    BiosSystemBiosMajorVersion                              : 2
    BiosSystemBiosMinorVersion                              : 5
    BiosTargetOperatingSystem                               : 0
    BiosVersion                                             : VRTUAL - 1
    CsAdminPasswordStatus                                   : Unknown
    CsAutomaticManagedPagefile                              : True
    CsAutomaticResetBootOption                              : True
    CsAutomaticResetCapability                              : True
    CsBootOptionOnLimit                                     : 
    CsBootOptionOnWatchDog                                  : 
    CsBootROMSupported                                      : True
    CsBootStatus                                            : {0, 0, 0, 127...}
    CsBootupState                                           : Normal boot
    CsCaption                                               : WIN16DCORE
    CsChassisBootupState                                    : Safe
    CsChassisSKUNumber                                      : 
    CsCurrentTimeZone                                       : 480
    CsDaylightInEffect                                      : 
    CsDescription                                           : AT/AT COMPATIBLE
    CsDNSHostName                                           : WIN16DCore
    CsDomain                                                : WORKGROUP
    CsDomainRole                                            : StandaloneServer
    CsEnableDaylightSavingsTime                             : True
    CsFrontPanelResetStatus                                 : Unknown
    CsHypervisorPresent                                     : True
    CsInfraredSupported                                     : False
    CsInitialLoadInfo                                       : 
    CsInstallDate                                           : 
    CsKeyboardPasswordStatus                                : Unknown
    CsLastLoadInfo                                          : 
    CsManufacturer                                          : Microsoft Corporation
    CsModel                                                 : Virtual Machine
    CsName                                                  : WIN16DCORE
    CsNetworkAdapters                                       : {vEthernet - 1}
    CsNetworkServerModeEnabled                              : True
    CsNumberOfLogicalProcessors                             : 1
    CsNumberOfProcessors                                    : 1
    CsProcessors                                            : {Intel(R) Core(TM) i3-2100 CPU @ 3.10GHz}
    CsOEMStringArray                                        : {[MS_VM_CERT/SHA1/9b80ca0d5dd061ec9da4e494f4c3fd1196270c22], 
                                                              00000000000000000000000000000000, To be filled by OEM}
    CsPartOfDomain                                          : False
    CsPauseAfterReset                                       : -1
    CsPCSystemType                                          : Desktop
    CsPCSystemTypeEx                                        : Desktop
    CsPowerManagementCapabilities                           : 
    CsPowerManagementSupported                              : 
    CsPowerOnPasswordStatus                                 : Unknown
    CsPowerState                                            : Unknown
    CsPowerSupplyState                                      : Safe
    CsPrimaryOwnerContact                                   : 
    CsPrimaryOwnerName                                      : Windows User
    CsResetCapability                                       : Other
    CsResetCount                                            : -1
    CsResetLimit                                            : -1
    CsRoles                                                 : {LM_Workstation, LM_Server, NT, Server_NT}
    CsStatus                                                : OK
    CsSupportContactDescription                             : 
    CsSystemFamily                                          : Virtual Machine
    CsSystemSKUNumber                                       : None
    CsSystemType                                            : x64-based PC
    CsThermalState                                          : Safe
    CsTotalPhysicalMemory                                   : 5082476544
    CsPhyicallyInstalledMemory                              : 4964352
    CsUserName                                              : 
    CsWakeUpType                                            : PowerSwitch
    CsWorkgroup                                             : WORKGROUP
    OsName                                                  : Microsoft Windows Server Datacenter
    OsType                                                  : WINNT
    OsOperatingSystemSKU                                    : 145
    OsVersion                                               : 10.0.16299
    OsCSDVersion                                            : 
    OsBuildNumber                                           : 16299
    OsHotFixes                                              : {KB4099989, KB4093112}
    OsBootDevice                                            : \Device\HarddiskVolume2
    OsSystemDevice                                          : \Device\HarddiskVolume4
    OsSystemDirectory                                       : C:\Windows\system32
    OsSystemDrive                                           : C:
    OsWindowsDirectory                                      : C:\Windows
    OsCountryCode                                           : 65
    OsCurrentTimeZone                                       : 480
    OsLocaleID                                              : 4809
    OsLocale                                                : en-SG
    OsLocalDateTime                                         : 29/4/2018 1:35:42 PM
    OsLastBootUpTime                                        : 29/4/2018 1:23:23 PM
    OsUptime                                                : 00:12:18.3221697
    OsBuildType                                             : Multiprocessor Free
    OsCodeSet                                               : 1252
    OsDataExecutionPreventionAvailable                      : True
    OsDataExecutionPrevention32BitApplications              : True
    OsDataExecutionPreventionDrivers                        : True
    OsDataExecutionPreventionSupportPolicy                  : OptOut
    OsDebug                                                 : False
    OsDistributed                                           : False
    OsEncryptionLevel                                       : 256
    OsForegroundApplicationBoost                            : Maximum
    OsTotalVisibleMemorySize                                : 4963356
    OsFreePhysicalMemory                                    : 4239756
    OsTotalVirtualMemorySize                                : 6536220
    OsFreeVirtualMemory                                     : 5858416
    OsInUseVirtualMemory                                    : 677804
    OsTotalSwapSpaceSize                                    : 
    OsSizeStoredInPagingFiles                               : 1572864
    OsFreeSpaceInPagingFiles                                : 1572864
    OsPagingFiles                                           : {C:\pagefile.sys}
    OsHardwareAbstractionLayer                              : 10.0.16299.371
    OsInstallDate                                           : 28/4/2018 8:41:19 PM
    OsManufacturer                                          : Microsoft Corporation
    OsMaxNumberOfProcesses                                  : 4294967295
    OsMaxProcessMemorySize                                  : 137438953344
    OsMuiLanguages                                          : {en-US}
    OsNumberOfLicensedUsers                                 : 0
    OsNumberOfProcesses                                     : 66
    OsNumberOfUsers                                         : 2
    OsOrganization                                          : 
    OsArchitecture                                          : 64-bit
    OsLanguage                                              : en-US
    OsProductSuites                                         : {TerminalServices, TerminalServicesSingleSession}
    OsOtherTypeDescription                                  : 
    OsPAEEnabled                                            : 
    OsPortableOperatingSystem                               : False
    OsPrimary                                               : True
    OsProductType                                           : Server
    OsRegisteredUser                                        : Windows User
    OsSerialNumber                                          : 00395-60000-00001-AA842
    OsServicePackMajorVersion                               : 0
    OsServicePackMinorVersion                               : 0
    OsStatus                                                : OK
    OsSuites                                                : {TerminalServices, TerminalServicesSingleSession}
    OsServerLevel                                           : ServerCore
    KeyboardLayout                                          : en-US
    TimeZone                                                : (UTC+08:00) Kuala Lumpur, Singapore
    LogonServer                                             : 
    PowerPlatformRole                                       : Desktop
    HyperVisorPresent                                       : True
    HyperVRequirementDataExecutionPreventionAvailable       : 
    HyperVRequirementSecondLevelAddressTranslation          : 
    HyperVRequirementVirtualizationFirmwareEnabled          : 
    HyperVRequirementVMMonitorModeExtensions                : 
    DeviceGuardSmartStatus                                  : Off
    DeviceGuardRequiredSecurityProperties                   : 
    DeviceGuardAvailableSecurityProperties                  : 
    DeviceGuardSecurityServicesConfigured                   : 
    DeviceGuardSecurityServicesRunning                      : 
    DeviceGuardCodeIntegrityPolicyEnforcementStatus         : 
    DeviceGuardUserModeCodeIntegrityPolicyEnforcementStatus : 

    Here is cmdlet to find the container cmdlet and result

    Get-WindowsFeature -Name Containers
    Display Name                                            Name                       Install State
    ------------                                            ----                       -------------
    [X] Containers                                          Containers                     Installed
    
    Get-InstalledModule
    Version    Name                                Repository           Description
    -------    ----                                ----------           -----------
    1.0.0.4    DockerMsftProvider                  PSGallery            PowerShell module with commands for discovering,...
    1.0.154    DockerPowershell                    PSGallery            Adds cmdlets to work with the Docker cli.
    
    get-command | where Source -EQ "*cont*"
    Empty


    Make Simple & Easy

    Monday, April 30, 2018 5:52 AM

All replies

  • Check with below command. It will show all existing container on your server.

    docker ps command

    • Proposed as answer by AmitCEH Monday, April 30, 2018 7:48 AM
    Monday, April 30, 2018 7:27 AM
  • Hi AmiCEH,

    Thanks for reply. I'm looking container cmdlet in PowerShell. By right i should see below cmdlet when type 

    Get-WindowsFeature container*
    CommandType     Name                                               Version    Source                                                                                     -----------     ----                                               -------    ------                                                                                           
    Cmdlet          Get-ContainerNetwork                               1.0.0.0    Containers        
    Cmdlet          New-ContainerNetwork                               1.0.0.0    Containers       
    Cmdlet          Remove-ContainerNetwork                            1.0.0.0    Containers                                                   

    Now, i don't see any cmdlet when i type above cmdlet in PowerShell. All are missing in PowerShell.


    Make Simple & Easy



    • Edited by Yukonn Monday, April 30, 2018 9:24 AM
    Monday, April 30, 2018 9:18 AM
  • I hope this will help you  on what exactly you want.

    get-command -module containers.

    • Proposed as answer by AmitCEH Monday, April 30, 2018 12:24 PM
    Monday, April 30, 2018 12:20 PM
  • There are virtually no powershell cmdlets to manage containers. You are probably referring to this abandonded project https://github.com/Microsoft/Docker-PowerShell/
    Monday, April 30, 2018 1:23 PM
  • Hi Artisticcheese,

    Thanks for reply. Yes, "Docker-PowerShell" is already deprecated. "New-ContainerNetwork" is not under "Docker-PowerShell". It's under "Containers" module. I take screenshot from nano server.

    "Containers" module

    "Docker-PowerShell" module


    Make Simple & Easy

    Tuesday, May 1, 2018 1:04 PM
  • OK, so what are you asking exactly?
    Tuesday, May 1, 2018 1:06 PM
  • Hi AmitCEH,

    Which powershell module did you install to get "Containers"? I'm looking containers module.


    Make Simple & Easy

    Tuesday, May 1, 2018 1:07 PM
  • hi,

    I need to run "New-ContainerNetwork" in my new server. But I can't find any cmdlet that related with container. I try to filter on new server but I didn't get any related with containers. In order to get "New-ContainerNetwork" which powershell module I need to install on new server.


    Make Simple & Easy


    • Edited by Yukonn Tuesday, May 1, 2018 1:13 PM
    Tuesday, May 1, 2018 1:11 PM
  • Substiture `source` with `name`

    PS C:\Users\admin> get-command | where name -like *container*
    CommandType     Name                                               Version    Source
    -----------     ----                                               -------    ------
    Cmdlet          Get-ContainerNetwork                               1.0.0.0    Containers
    Cmdlet          New-ContainerNetwork                               1.0.0.0    Containers
    Cmdlet          Remove-ContainerNetwork                            1.0.0.0    Containers


    or just get-command *container*
    Tuesday, May 1, 2018 1:16 PM
  • Here is result after I follow your command.

    PS C:\windows\system32\windowspowershell\v1.0\Modules> get-command | where name -like *container*
    CommandType     Name                                               Version    Source
    -----------     ----                                               -------    ------
    Alias           Attach-Container                                   0.1.0.111  docker
    Alias           Build-ContainerImage                               0.1.0.111  docker
    Alias           Commit-Container                                   0.1.0.111  docker
    Alias           Exec-Container                                     0.1.0.111  docker
    Alias           Load-ContainerImage                                0.1.0.111  docker
    Alias           Pull-ContainerImage                                0.1.0.111  docker
    Alias           Push-ContainerImage                                0.1.0.111  docker
    Alias           Run-ContainerImage                                 0.1.0.111  docker
    Alias           Save-ContainerImage                                0.1.0.111  docker
    Alias           Tag-ContainerImage                                 0.1.0.111  docker
    Cmdlet          Add-ContainerImageTag                              0.1.0.111  docker
    Cmdlet          ConvertTo-ContainerImage                           0.1.0.111  docker
    Cmdlet          Copy-ContainerFile                                 0.1.0.111  docker
    Cmdlet          Enter-ContainerSession                             0.1.0.111  docker
    Cmdlet          Export-ContainerImage                              0.1.0.111  docker
    Cmdlet          Get-Container                                      0.1.0.111  docker
    Cmdlet          Get-ContainerDetail                                0.1.0.111  docker
    Cmdlet          Get-ContainerImage                                 0.1.0.111  docker
    Cmdlet          Get-ContainerNet                                   0.1.0.111  docker
    Cmdlet          Get-ContainerNetDetail                             0.1.0.111  docker
    Cmdlet          Import-ContainerImage                              0.1.0.111  docker
    Cmdlet          Invoke-ContainerImage                              0.1.0.111  docker
    Cmdlet          New-Container                                      0.1.0.111  docker
    Cmdlet          New-ContainerImage                                 0.1.0.111  docker
    Cmdlet          New-ContainerNet                                   0.1.0.111  docker
    Cmdlet          Remove-Container                                   0.1.0.111  docker
    Cmdlet          Remove-ContainerImage                              0.1.0.111  docker
    Cmdlet          Remove-ContainerNet                                0.1.0.111  docker
    Cmdlet          Request-ContainerImage                             0.1.0.111  docker
    Cmdlet          Start-Container                                    0.1.0.111  docker
    Cmdlet          Start-ContainerProcess                             0.1.0.111  docker
    Cmdlet          Stop-Container                                     0.1.0.111  docker
    Cmdlet          Submit-ContainerImage                              0.1.0.111  docker
    Cmdlet          Wait-Container                                     0.1.0.111  docker

    I can't find any source from containers.


    Make Simple & Easy

    Tuesday, May 1, 2018 1:19 PM
  • Check if you have module in proper location under C:\Windows\system32\WindowsPowerShell\v1.0\Modules\Containers\
    Tuesday, May 1, 2018 1:19 PM
  • It does not exists in "C:\Windows\system32\WindowsPowerShell\v1.0\Modules\Containers\" location.

        Directory: C:\windows\system32\windowspowershell\v1.0\Modules

    Mode                LastWriteTime         Length Name
    ----                -------------         ------ ----
    d---s-        29/9/2017   8:29 PM                AppLocker
    d-----        29/9/2017  10:39 PM                Appx
    d-----        29/9/2017  10:39 PM                BestPractices
    d---s-        29/9/2017   8:29 PM                BitsTransfer
    d---s-        29/9/2017   8:29 PM                BranchCache
    d-----        29/9/2017   8:29 PM                CimCmdlets
    d---s-        29/9/2017  10:39 PM                ConfigCI
    d-----        29/9/2017   8:29 PM                Defender
    d---s-        29/9/2017   8:29 PM                DeliveryOptimization
    d-----        29/9/2017   8:29 PM                DirectAccessClientComponents
    d-----        29/9/2017  10:39 PM                Dism
    d-----        29/9/2017   8:29 PM                DnsClient
    d-----        29/9/2017   8:29 PM                EventTracingManagement
    d-----         1/5/2018   6:24 PM                HostComputeService
    d-----         1/5/2018   6:24 PM                HostNetworkingService
    d---s-        29/9/2017   8:29 PM                International
    d-----        29/9/2017   8:29 PM                iSCSI
    d-----        29/9/2017  10:39 PM                IscsiTarget
    d---s-        29/9/2017  10:39 PM                Kds
    d-----        29/9/2017  10:39 PM                Microsoft.PowerShell.Archive
    d-----        29/9/2017   8:29 PM                Microsoft.PowerShell.Diagnostics
    d-----        29/9/2017   8:29 PM                Microsoft.PowerShell.Host
    d-----        29/9/2017   8:28 PM                Microsoft.PowerShell.LocalAccounts
    d-----        29/9/2017   8:29 PM                Microsoft.PowerShell.Management
    d-----        29/9/2017  10:39 PM                Microsoft.PowerShell.ODataUtils
    d-----        29/9/2017   8:29 PM                Microsoft.PowerShell.Security
    d-----        29/9/2017   8:29 PM                Microsoft.PowerShell.Utility
    d-----        29/9/2017   8:29 PM                Microsoft.WSMan.Management
    d---s-        29/9/2017   8:29 PM                MMAgent
    d-----        29/9/2017  10:39 PM                MsDtc
    d-----        29/9/2017   8:29 PM                NetAdapter
    d-----        29/9/2017   8:29 PM                NetConnection
    d-----        29/9/2017   8:29 PM                NetEventPacketCapture
    d-----        29/9/2017   8:29 PM                NetLbfo
    d-----        29/9/2017   8:29 PM                NetNat
    d-----        29/9/2017   8:29 PM                NetQos
    d-----        29/9/2017  10:39 PM                NetSecurity
    d-----        29/9/2017   8:29 PM                NetSwitchTeam
    d-----        29/9/2017   8:29 PM                NetTCPIP
    d-----        29/9/2017   8:29 PM                NetworkConnectivityStatus
    d-----        29/9/2017   8:29 PM                NetworkTransition
    d-----        29/9/2017   8:29 PM                NFS
    d-----        29/9/2017   8:29 PM                PcsvDevice
    d---s-        29/9/2017  10:39 PM                PKI
    d---s-        29/9/2017   8:29 PM                PlatformIdentifier
    d-----        29/9/2017   8:29 PM                PnpDevice
    d-----        29/9/2017   8:29 PM                PrintManagement
    d---s-        29/9/2017  10:39 PM                PSDesiredStateConfiguration
    d-----        29/9/2017   8:29 PM                PSDiagnostics
    d-----        29/9/2017   8:29 PM                PSScheduledJob
    d-----        29/9/2017   8:29 PM                PSWorkflow
    d-----        29/9/2017   8:29 PM                PSWorkflowUtility
    d-----        29/9/2017  10:39 PM                RemoteDesktop
    d-----        29/9/2017   8:29 PM                ScheduledTasks
    d---s-        29/9/2017  10:39 PM                SecureBoot
    d---s-        29/9/2017   8:29 PM                SecurityCmdlets
    d---s-        29/9/2017   8:29 PM                ServerCore
    d-----        29/9/2017  10:39 PM                ServerManager
    d---s-        29/9/2017   8:29 PM                ServerManagerTasks
    d---s-        29/9/2017  10:39 PM                SmbShare
    d-----        29/9/2017   8:29 PM                SmbWitness
    d---s-        29/9/2017   8:29 PM                SoftwareInventoryLogging
    d-----        29/9/2017   8:29 PM                Storage
    d---s-        29/9/2017  10:39 PM                TLS
    d---s-        29/9/2017  10:39 PM                TrustedPlatformModule
    d-----        29/9/2017   8:29 PM                UserAccessLogging
    d-----        29/9/2017   8:29 PM                Wdac
    d---s-        29/9/2017  10:39 PM                Whea
    d-----        29/9/2017   8:29 PM                WindowsErrorReporting
    d-----        29/9/2017   8:29 PM                WindowsUpdate
    d-----        29/9/2017   8:29 PM                WindowsUpdateProvider


    Make Simple & Easy

    Tuesday, May 1, 2018 1:21 PM
  • I believe it's installed as part of windows containers feature installation. I have it present on all my windows hosts. Is it reproducible for you on several clean Windows 2016 machines?
    Tuesday, May 1, 2018 1:23 PM
  • I created another new clean server (en_windows_server_version_1709_updated_jan_2018_x64_dvd_100492040.ios). But still missing container module. I found that module on nano server same as you mentioned location.

    Here is what I installed windows feature on Windows 2016 Core Server.

    Display Name                                            Name                       Install State
    ------------                                            ----                       -------------
    [X] File and Storage Services                           FileAndStorage-Services        Installed
        [X] Storage Services                                Storage-Services               Installed
    [X] .NET Framework 4.7 Features                         NET-Framework-45-Fea...        Installed
        [X] .NET Framework 4.7                              NET-Framework-45-Core          Installed
        [X] WCF Services                                    NET-WCF-Services45             Installed
            [X] TCP Port Sharing                            NET-WCF-TCP-PortShar...        Installed
    [X] Containers                                          Containers                     Installed
    [X] Windows Defender Features                           Windows-Defender-Fea...        Installed
        [X] Windows Defender                                Windows-Defender               Installed
    [X] Windows PowerShell                                  PowerShellRoot                 Installed
        [X] Windows PowerShell 5.1                          PowerShell                     Installed
    [X] WoW64 Support                                       WoW64-Support                  Installed


    Make Simple & Easy

    Tuesday, May 1, 2018 1:28 PM
  • I can confirm the issue. This module is present on full GUI server but missing from server core. This needs to be escalated to Microsoft. Not sure what  the proper channel is though since majority of issues I had with containers were docker related which is tracked on GitHub but this seems to be Microsoft issue.
    Tuesday, May 1, 2018 1:30 PM
  • Also your version of server core is 1709 it's not Windows 2016. Try server core 2016. It might be removed from 1709 since they wanted to slim down size of the image.
    Tuesday, May 1, 2018 1:31 PM
  • Thanks for your help. I try to use another windows 2016 Server Core. Still can install the container feature on server core 1709 but not able to use the ps is so surprise. 

    Have a nice day to you.


    Make Simple & Easy

    Tuesday, May 1, 2018 1:39 PM
  • You can create those network with `docker` commands my understanding, why are you specifically try to use powershell?
    Tuesday, May 1, 2018 1:44 PM
  • You are right, we can use "docker" command. The reason why I ask is, I need to re-write my existing ps script and want to know what is the root case.

    Make Simple & Easy

    Tuesday, May 1, 2018 1:49 PM
  • I would bet it's present in Windows 2016 Server Core but missing in Server 1709 server core. They cut Server Core 1709 size and this was redundant since it's available via docker CLI (ugly beast compared to powershell)
    Tuesday, May 1, 2018 1:50 PM
  • Thanks for your info. I double check at windows server forum. At least we can hear some comment from other user.

    Make Simple & Easy

    Tuesday, May 1, 2018 1:55 PM
  • Only I installed Container  from Roles and features  and

    checked with get-command -module containers

    and installed docker from powershell .

    Tuesday, May 1, 2018 4:59 PM
  • Issue mentioned above is on Windows Server 1709 only. There is no issues on other versions.
    Tuesday, May 1, 2018 5:11 PM