Getting USB Version through WMI Classes - powershell

I am trying to query the USB Device for the USB Descriptor which will store information regarding the USB Version, Device ID, PID, VID etc. I only need the USB Version.
Here is the PowerShell Code so far:
[System.Reflection.Assembly]::Load("System.Management, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
$Man = New-Object System.Management.ManagementClass("Win32_USBHub")
[System.Management.ManagementObjectCollection]$Devs = $Man.GetInstances()
echo $Devs
The output I am getting is:
__GENUS : 2
__CLASS : Win32_USBHub
__SUPERCLASS : CIM_USBHub
__DYNASTY : CIM_ManagedSystemElement
__RELPATH : Win32_USBHub.DeviceID="USB\\VID_0781&PID_5567\\4C530000120619102080"
__PROPERTY_COUNT : 28
__DERIVATION : {CIM_USBHub, CIM_USBDevice, CIM_LogicalDevice, CIM_LogicalElement...}
__SERVER : APPS-SD-AUTO-PC
__NAMESPACE : root\cimv2
__PATH : \\APPS-SD-AUTO- PC\root\cimv2:Win32_USBHub.DeviceID="USB\\VID_0781&PID_5567\\4C530000120619102080"
Availability :
Caption : USB Mass Storage Device
ClassCode :
ConfigManagerErrorCode : 0
ConfigManagerUserConfig : False
CreationClassName : Win32_USBHub
CurrentAlternateSettings :
CurrentConfigValue :
Description : USB Mass Storage Device
DeviceID : USB\VID_0781&PID_5567\4C530000120619102080
ErrorCleared :
ErrorDescription :
GangSwitched :
InstallDate :
LastErrorCode :
Name : USB Mass Storage Device
NumberOfConfigs :
NumberOfPorts :
PNPDeviceID : USB\VID_0781&PID_5567\4C530000120619102080
PowerManagementCapabilities :
PowerManagementSupported :
ProtocolCode :
Status : OK
StatusInfo :
SubclassCode :
SystemCreationClassName : Win32_ComputerSystem
SystemName : APPS-SD-AUTO-PC
USBVersion :
Here USBVersion is coming as an empty field. Can anyone suggest a solution?
I have tried with Win32_usbDeviceController but that is also returning an empty field.

Related

Is there a way to get the server ID of the registered server in an Azure storage sync service through power shell or ARM template?

{
"name": "string",
"type": "Microsoft.StorageSync/storageSyncServices/syncGroups/serverEndpoints",
"apiVersion": "2019-06-01",
"properties": {
"serverLocalPath": "string",
"cloudTiering": "string",
"volumeFreeSpacePercent": "integer",
"tierFilesOlderThanDays": "integer",
"friendlyName": "string",
"serverResourceId": "string",
"offlineDataTransfer": "string",
"offlineDataTransferShareName": "string"
}
}
What needs to be passed as a server resource id in the above template format for storage sync. How do we get the server id ?
Yes. Use the Get-AzStorageSyncServerEndpoint cmdlet from the Az.StorageSync module to list all server endpoints within a given sync group.
Get-AzStorageSyncServerEndpoint -ResourceGroupName "myResourceGroup" -StorageSyncServiceName "mysyncservice" -SyncGroupName "testsyncgroup"
Sample Response:
SyncGroupName : testsyncgroup
StorageSyncServiceName : mysyncservice
ServerLocalPath : C:\Users\onpremwindows\Desktop\myfolder
ServerResourceId : /subscriptions/***/resourceGroups/myResourceGroup/providers/microsoft.stor
agesync/storageSyncServices/mysyncservice/registeredServers/8ec8b78c-0739-195r-856e-2e7r5ta2c13w
ServerEndpointName : 94e9fd59-23d6-9854-99c1-3e9a8ab73760
ProvisioningState : Succeeded
LastWorkflowId : storageSyncServices/mysyncservice/workflows/bd3o8c77-7183-4a46-8830-9b156dd2f011
LastOperationName : ICreateServerEndpointWorkflow
FriendlyName : onpremwindows
SyncStatus : Microsoft.Azure.Commands.StorageSync.Models.PSServerEndpointHealth
CloudTiering : Off
VolumeFreeSpacePercent : 20
TierFilesOlderThanDays :
OfflineDataTransfer : Off
OfflineDataTransferShareName :
OfflineDataTransferStorageAccountResourceId :
OfflineDataTransferStorageAccountTenantId :
InitialDownloadPolicy : NamespaceThenModifiedFiles
LocalCacheMode : UpdateLocallyCachedFiles
ResourceId : /subscriptions/***/resourceGroups/myResourceGroup/providers/microsoft.stor
agesync/storageSyncServices/mysyncservice/syncGroups/testsyncgroup/serverEndpoints/94e9fd59-23d6-9854-99c1-3e9a8ab73760
ResourceGroupName : myResourceGroup
Type : microsoft.storagesync/storageSyncServices/syncGroups/serverEndpoints
8ec8b78c-0739-195r-856e-2e7r5ta2c13w would be the ServerId you can pass.
You can obtain the ServerId using the Get-AzStorageSyncService cmdlet as well:
Get-AzStorageSyncService -ResourceGroupName "myResourceGroup" -StorageSyncServiceName "mysyncservice"
Sample response:
StorageSyncServiceName : mysyncservice
ServerName : 8ec8b78c-0739-195r-856e-2e7r5ta2c13w
ServerCertificate :
AgentVersion : 8.0.0.0
ServerOSVersion : 10.0.14393.0
ServerManagementErrorCode : 0
LastHeartBeat : 12/10/2019 12:55:01
ProvisioningState : Succeeded
ServerRole : Standalone
ClusterId : 00000000-0000-0000-0000-000000000000
ClusterName :
ServerId : 8ec8b78c-0739-195r-856e-2e7r5ta2c13w
StorageSyncServiceUid : 76104503-6cd8-4812-7884-c4288e87a8cd
LastWorkflowId : storageSyncServices/finalsync/workflows/0e3bc737-7619-4b42-81a9-aec36e3fbf53
LastOperationName : ICreateRegisteredServerWorkflow
DiscoveryEndpointUri : https://tm-server.xxx.com:443
ResourceLocation : eastasia
ServiceLocation : eastasia
FriendlyName : onpremwindows
ManagementEndpointUri : https://tm-server.xxx.com:443
MonitoringEndpointUri : https://tm-server.xxx.com:443
ResourceId : /subscriptions/***/resourceGroups/myResourceGroup/providers/microsoft.storagesync/storageSyncServices/mysyncservice/registeredServers/8ec8b78c-0739-195r-856e-2e7r5ta2c13w
ResourceGroupName : myResourceGroup
Type : microsoft.storagesync/storageSyncServices/registeredServers

How to group SQL DataRow results by Name depending on condition

I get results from a SQL Table with this command:
$GetData = Invoke-Sqlcmd -ConnectionString $Connection -Query $GetQuery
One single result looks like this (there are about 500 of these results):
ID : 1584
ObjId :
ARTIKEL_NR : 0
ArtBeschrieb1_3 :
KLASSE : TbXAusführungen
SMB1 : Produkt
SMW1 : TbA
SMN1 :
SMB2 : Ausführung
SMW2 : 2M-Zarge Front
SMN2 :
SMB3 : Boxtypen
SMW3 : B;C-M;D-M
SMN3 :
SMB4 : SortKZ
SMW4 :
SMN4 : 2.000000
SMB5 :
SMW5 :
SMN5 :
SMB6 :
SMW6 :
SMN6 :
SMB7 :
SMW7 :
SMN7 :
SMB8 :
SMW8 :
SMN8 :
SMB9 :
SMW9 :
SMN9 :
SMB10 :
SMW10 :
SMN10 :
SMB11 :
SMW11 :
SMN11 :
SMB12 :
SMW12 :
SMN12 :
SMB13 :
SMW13 :
SMN13 :
SMB14 :
SMW14 :
SMN14 :
SMB15 :
SMW15 :
SMN15 :
SMB16 :
SMW16 :
SMN16 :
SMB17 :
SMW17 :
SMN17 :
SMB18 :
SMW18 :
SMN18 :
SMB19 :
SMW19 :
SMN19 :
SMB20 :
SMW20 :
SMN20 :
SMB21 :
SMW21 :
SMN21 :
SMB22 :
SMW22 :
SMN22 :
SMB23 :
SMW23 :
SMN23 :
SMB24 :
SMW24 :
SMN24 :
SMB25 :
SMW25 :
SMN25 :
SMB26 :
SMW26 :
SMN26 :
SMB27 :
SMW27 :
SMN27 :
SMB28 :
SMW28 :
SMN28 :
SMB29 :
SMW29 :
SMN29 :
SMB30 :
SMW30 :
SMN30 :
DividendPreisEinhet : 0
SMB31 :
SMW31 :
SMN31 :
ArtBeschrieb1_2FR :
SMB32 :
SMW32 :
SMN32 :
OOPreisklasse :
SMB33 :
SMW33 :
SMN33 :
SMB34 :
SMW34 :
SMN34 :
SMB35 :
SMW35 :
SMN35 :
SMB36 :
SMW36 :
SMN36 :
SMB37 :
SMW37 :
SMN37 :
SMB38 :
SMW38 :
SMN38 :
SMB39 :
SMW39 :
SMN39 :
SMB40 :
SMW40 :
SMN40 :
As You can see there are always 3 SM* Properties with the same Number. I would like to group them. SMB* should become the Property Name and either SMW* or SMN* the PropertyValue, depending on which is NULL and which is not.
I think I can do the PropertyName / PropertyValue part on my own, but how can I group all corresponding SM* fields?
btw: The Fields that are not SM* fields are already OK, they should stay the way they are.
I know there is $PSObject.Properties but that does not seem to help me here?
PS Z:\Powershell-Scripts> $GetData.gettype()
IsPublic IsSerial Name BaseType
-------- -------- ---- --------
True True Object[] System.Array
Below code should do what you want:
$GetData = Invoke-Sqlcmd -ConnectionString $Connection -Query $GetQuery
$result = foreach ($item in $GetData) {
# create an Ordered hash to collect the item data
$newObject = [ordered]#{}
# get all property names in order
$propNames = ($item.PsObject.Properties).Name
for ($i = 0; $i -lt $propNames.Count; $i++) {
$name = $propNames[$i]
if ($name -notlike 'SM*') {
$newObject[$name] = $item.$name
}
else {
$num = $name -replace '\D'
$value = if ([string]::IsNullOrWhiteSpace($item."SMW$num")) { $item."SMN$num" } else { $item."SMW$num" }
$newObject["SMB$num"] = $value
$i += 2
}
}
[PsCustomObject]$newObject
}
# output on console
$result
# output to CSV
$result | Export-Csv -Path 'D:\QueryResultCondensed.csv' -NoTypeInformation
Output for the example item:
ID : 1584
ObjId :
ARTIKEL_NR : 0
ArtBeschrieb1_3 :
KLASSE : TbXAusführungen
SMB1 : TbA
SMB2 : 2M-Zarge Front
SMB3 : B;C-M;D-M
SMB4 : 2.000000
SMB5 :
SMB6 :
SMB7 :
SMB8 :
SMB9 :
SMB10 :
SMB11 :
SMB12 :
SMB13 :
SMB14 :
SMB15 :
SMB16 :
SMB17 :
SMB18 :
SMB19 :
SMB20 :
SMB21 :
SMB22 :
SMB23 :
SMB24 :
SMB25 :
SMB26 :
SMB27 :
SMB28 :
SMB29 :
SMB30 :
DividendPreisEinhet : 0
SMB31 :
ArtBeschrieb1_2FR :
SMB32 :
OOPreisklasse :
SMB33 :
SMB34 :
SMB35 :
SMB36 :
SMB37 :
SMB38 :
SMB39 :
SMB40 :
This was what I was actually looking for - sorry for not explaining it well enough
$GetData = Invoke-Sqlcmd -ConnectionString $ConnectionLogik -Query $GetQuery
$NewData = foreach ($dat in $GetData)
{
# Get rid of empty and useless Properties
$NotArray = #("RowState","ItemArray","HasErrors")
$Objects = $dat.Psobject.properties |
Where-Object {![string]::IsNullOrWhiteSpace($_.Value) -and $_.Name -notin $NotArray} |
Select-Object Name, Value
# Create new Properties from pairs
$SingleObject = [ordered]#{}
foreach ($obj in $Objects) {
if ($obj.Name -like 'SM*') {
if ($obj.Name -like 'SMW*' -or $obj.Name -like 'SMN*') { Continue }
$match = 'SM[NW]' + $obj.Name.Substring(3) + '$'
$val = $Objects | Where-Object { $_.Name -match $match } | Select -Expand Value
$SingleObject[$obj.Value] = $val
} else {
$SingleObject[$obj.Name] = $obj.Value
}
}
[PSCustomObject]$SingleObject
}
This will leave me with output like this:
ID : 1584
ARTIKEL_NR : 0
KLASSE : TbXAusführungen
Produkt : TbA
Ausführung : 2M-Zarge Front
Boxtypen : B;C-M;D-M
SortKZ : 2.000000
DividendPreisEinhet : 0
ID : 443
ObjId : 20854
ARTIKEL_NR : 14.39007.00
ArtBeschrieb1_3 : Verpackung
KLASSE : TbALeistungenAntaro
TextID : Material.Verpackung
DividendPreisEinhet : 1
ID : 1528
ARTIKEL_NR : 0
KLASSE : TbXFrontbefestigung
ArtNoBlum :
Bezeichnung : keine
DividendPreisEinhet : 0
Which I was then able to export to CSV grouped by each KLASSE Property
$NewData | Group-Object KLASSE | ForEach-Object { $_.Group | Export-Csv I:\TRANSFER\$($_.Name).csv -delimiter ';' -NoTypeInformation }

Duplex WIA scan properties missing

I can't access/find the duplex property / setting on my scanner via Powershell and via WIA 2.0 .
I 've installed the correct drivers but it seems, that alot of properties are missing (see below).
Am I reading from the wrong device properties? -> device.Properties["Document Handling Select"] = 5 (found here WIA 2.0 Duplex scanning ).
The scanner scans both pages in 1 turn (double-sided scan).
Tried several "fixes" of other questions, including calling the image item.transfer twice - doesn't provide the backpage though.
What works:
Everything, including scanning a page and saving it into a .tiff file
What doesn't work:
Duplex - I 've searched millions of sites, WIA 2.0 documentation, but I can't seem to find the right property to set the device.Properties["Document Handling Select"] = 5 (found here WIA 2.0 Duplex scanning )
The Scanner is Duplex and works with duplex in every standard scan setting
Powershell snippet
While ($true) {
"in While"
Try{
$deviceManager = new-object -ComObject WIA.DeviceManager
"Devices: " + $deviceManager.DeviceInfos.Count()
$device = $deviceManager.DeviceInfos.Item(1).Connect()
} catch {
"while break"
$error
break
}
$x = 1
while ($x -lt 17){
$device.Properties($x)
$x = $x + 1
}
$imageProcess = new-object -ComObject WIA.ImageProcess
$wiaFormatTIFF = "{B96B3CB1-0728-11D3-9D7B-0000F81EF32E}"
foreach ($item in $device.Items) {
"device items: " + $device.Items.Count
$image = $item.Transfer($wiaFormatTIFF)
$imageback = $item.Transfer($wiaFormatTIFF)
Property output
Properties output of Powershell device properties over USB:
Name : User Name
PropertyID : 3112
Type : 16
IsReadOnly : True
IsVector : False
SubType : 0
SubTypeDefault :
SubTypeValues :
SubTypeMin :
SubTypeMax :
SubTypeStep :
Value : Root
Name : Item Name
PropertyID : 4098
Type : 16
IsReadOnly : True
IsVector : False
SubType : 0
SubTypeDefault :
SubTypeValues :
SubTypeMin :
SubTypeMax :
SubTypeStep :
Value : 0001\Root
Name : Full Item Name
PropertyID : 4099
Type : 16
IsReadOnly : True
IsVector : False
SubType : 0
SubTypeDefault :
SubTypeValues :
SubTypeMin :
SubTypeMax :
SubTypeStep :
Value : 76
Name : Item Flags
PropertyID : 4101
Type : 5
IsReadOnly : True
IsVector : False
SubType : 0
SubTypeDefault :
SubTypeValues :
SubTypeMin :
SubTypeMax :
SubTypeStep :
Value : {6BDD1FC6-810F-11D0-BEC7-08002BE2092F}\0001
Name : Unique Device ID
PropertyID : 2
Type : 16
IsReadOnly : False
IsVector : False
SubType : 0
SubTypeDefault :
SubTypeValues :
SubTypeMin :
SubTypeMax :
SubTypeStep :
Value : CANON
Name : Manufacturer
PropertyID : 3
Type : 16
IsReadOnly : True
IsVector : False
SubType : 0
SubTypeDefault :
SubTypeValues :
SubTypeMin :
SubTypeMax :
SubTypeStep :
Value : CANON DR-M140 USB
Name : Description
PropertyID : 4
Type : 16
IsReadOnly : True
IsVector : False
SubType : 0
SubTypeDefault :
SubTypeValues :
SubTypeMin :
SubTypeMax :
SubTypeStep :
Value : 65536
Name : Type
PropertyID : 5
Type : 5
IsReadOnly : True
IsVector : False
SubType : 0
SubTypeDefault :
SubTypeValues :
SubTypeMin :
SubTypeMax :
SubTypeStep :
Value : \\.\Usbscan4
Name : Port
PropertyID : 6
Type : 16
IsReadOnly : True
IsVector : False
SubType : 0
SubTypeDefault :
SubTypeValues :
SubTypeMin :
SubTypeMax :
SubTypeStep :
Value : CANON DR-M140 USB
Name : Name
PropertyID : 7
Type : 16
IsReadOnly : True
IsVector : False
SubType : 0
SubTypeDefault :
SubTypeValues :
SubTypeMin :
SubTypeMax :
SubTypeStep :
Value : local
Name : Server
PropertyID : 8
Type : 16
IsReadOnly : False
IsVector : False
SubType : 0
SubTypeDefault :
SubTypeValues :
SubTypeMin :
SubTypeMax :
SubTypeStep :
Value :
Name : Remote Device ID
PropertyID : 9
Type : 16
IsReadOnly : False
IsVector : False
SubType : 0
SubTypeDefault :
SubTypeValues :
SubTypeMin :
SubTypeMax :
SubTypeStep :
Value : {B763D1FD-94C8-4ef6-B5E8-E7F3086CF161}
Name : UI Class ID
PropertyID : 10
Type : 16
IsReadOnly : True
IsVector : False
SubType : 0
SubTypeDefault :
SubTypeValues :
SubTypeMin :
SubTypeMax :
SubTypeStep :
Value : 0
Name : Hardware Configuration
PropertyID : 11
Type : 5
IsReadOnly : True
IsVector : False
SubType : 0
SubTypeDefault :
SubTypeValues :
SubTypeMin :
SubTypeMax :
SubTypeStep :
Value :
Name : BaudRate
PropertyID : 12
Type : 16
IsReadOnly : True
IsVector : False
SubType : 0
SubTypeDefault :
SubTypeValues :
SubTypeMin :
SubTypeMax :
SubTypeStep :
Value : 19
Name : STI Generic Capabilities
PropertyID : 13
Type : 5
IsReadOnly : True
IsVector : False
SubType : 0
SubTypeDefault :
SubTypeValues :
SubTypeMin :
SubTypeMax :
SubTypeStep :
device items: 1
Okay, actually the scanner didn't have the property for duplex, while beeing duplex.
Tried it with another scanner and with that property it works.
Try {
"device items: " + $device.Items.Count
$device.Properties["3088"].Value = 5 <--- Duplex property 5, ID 3088
$device.Properties["3087"].Value
$imageback = $item.Transfer($wiaFormatTIFF)
} catch {
"while break"
$error
$killwhile = 1
break
}

Missing Containers Cmdlet

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

Windows Azure Added Endpoint Doesn't Show up on the Management Page

I added an endpoint to a VM in Azure using the following two commands in powershell:
Add-AzureEndpoint -Name "foo" -Protocol "UDP" -LocalPort "12345" -VM $vm
Set-AzureEndpoint -LocalPort "12345" -Name "foo" -Protocol "UDP" -PublicPort "12345" -VM $vm
I can see the endpoint using powershell (output below), but I don't see it in the manage.windowsazure.com website. Do I need to do something special to get it to show up? Did I not add it correctly? Or half-add it somehow? I notice the others (all added through the website) all have VIP entries, and mine does not. I don't see anything in the documentation about how to set a VIP. Do I need one?
Get-AzureEndpoint -VM $vm
LBSetName :
LocalPort : 5986
Name : PowerShell
Port : 5986
Protocol : tcp
Vip : abc.def.ghi.jkl
ProbePath :
ProbePort : 0
ProbeProtocol :
ProbeIntervalInSeconds :
ProbeTimeoutInSeconds :
EnableDirectServerReturn : False
Acl : {}
LBSetName :
LocalPort : 3389
Name : Remote Desktop
Port : 51578
Protocol : tcp
Vip : abc.def.ghi.jkl
ProbePath :
ProbePort : 0
ProbeProtocol :
ProbeIntervalInSeconds :
ProbeTimeoutInSeconds :
EnableDirectServerReturn : False
Acl : {}
LBSetName :
LocalPort : 445
Name : smb
Port : 445
Protocol : tcp
Vip : abc.def.ghi.jkl
ProbePath :
ProbePort : 0
ProbeProtocol :
ProbeIntervalInSeconds :
ProbeTimeoutInSeconds :
EnableDirectServerReturn : False
Acl : {}
LBSetName :
LocalPort : 139
Name : smb2
Port : 139
Protocol : tcp
Vip : abc.def.ghi.jkl
ProbePath :
ProbePort : 0
ProbeProtocol :
ProbeIntervalInSeconds :
ProbeTimeoutInSeconds :
EnableDirectServerReturn : False
Acl : {}
LBSetName :
LocalPort : 12345
Name : foo
Port : 12345
Protocol : UDP
Vip :
ProbePath :
ProbePort : 0
ProbeProtocol :
ProbeIntervalInSeconds :
ProbeTimeoutInSeconds :
EnableDirectServerReturn :
Acl : {}
You need to update your VM object after changing endpoints. Finish off your script with this call:
$vm | Update-AzureVM