CollapseAll image

Add a Wireless Profile

Adding a new wireless profile creates a new CIM_WiFiEndpointSettings object. The  AMT_WiFiPortConfigurationService.AddWiFiSettings creates this object. If the defined AuthenticationMethod is WPA IEEE 802.1x, first create a CIM_IEEE8021xSettings object, supply a certificate to be connected with this profile and connect this CIM_IEEE8021xSettings object to the profile.

The following steps show how to get the endpoint reference of the CIM_WiFiEndpoint.

1.  Retrieve the instance of CIM_WiFiEndpoint, where the “Name” key equals “WiFi Endpoint 0”.

The following steps describe how to create a wireless profile that uses the WPA PSK authentication method.

2.  Locally create a CIM_WiFiEndpointSettings object and insert the relevant profile parameters (SSID, Priority, Authentication method, etc.). Set the AuthenticationMethod parameter to be WPA PSK.

3.  Invoke AMT_WiFiPortConfigurationService.AddWiFiSettings, with the saved reference to CIM_WiFiEndpoint and the locally defined CIM_WiFiEndpointSettings object as inputs. The method returns a reference to the new profile.

Click here for a snippet demonstrating this step

You can execute this snippet by inserting it into the execution template found here.

  

$wifiEndpointRef = $wsmanConnectionObject.NewReference("SELECT * FROM CIM_WiFiEndpoint WHERE Name='WiFi Endpoint 0'")

$wifiEndpointSettingsInstance = $wsmanConnectionObject.NewInstance("CIM_WiFiEndpointSettings")

$wifiEndpointSettingsInstance.SetProperty("AuthenticationMethod", "4") # 4 = WPA PSK.

$wifiEndpointSettingsInstance.SetProperty("ElementName", "Wireless-Profile-TKIP")

$wifiEndpointSettingsInstance.SetProperty("InstanceID", "Wireless-Profile-TKIP")

$wifiEndpointSettingsInstance.SetProperty("EncryptionMethod", "3") # 3 = TKIP.

$wifiEndpointSettingsInstance.SetProperty("PSKPassPhrase", "P@ssw0rd")

$wifiEndpointSettingsInstance.SetProperty("Priority", "6")

$wifiEndpointSettingsInstance.SetProperty("SSID", "Wireless-API")

$wifiPortConfigurationServiceRef = $wsmanConnectionObject.NewReference("SELECT * FROM AMT_WiFiPortConfigurationService WHERE Name='Intel(r) AMT WiFi Port Configuration Service'")

$inputObject = $wifiPortConfigurationServiceRef.CreateMethodInput("AddWiFiSettings")

$inputObject.SetProperty("WiFiEndpoint", $wifiEndpointRef)

$inputObject.SetProperty("WiFiEndpointSettingsInput", $wifiEndpointSettingsInstance)

$outputObject = $wifiPortConfigurationServiceRef.InvokeMethod($inputObject)

$returnValue = $outputObject.GetProperty("ReturnValue")

if($returnValue -like "0")

{

    # The $wifiEndpointSettingsRef is an EPR to the new CIM_WiFiEndpointSettings object.

    $wifiEndpointSettingsRef = $outputObject.GetProperty("WiFiEndpointSettings").Ref

}

 

 

The following steps describe how to create a wireless profile that uses the WPA IEEE802_1x authentication method.

1.  Locally create a CIM_WiFiEndpointSettings object and insert the relevant profile parameters (SSID, Priority, Authentication method, etc.). Set the AuthenticationMethod parameter to be WPA IEEE802_1x.

2.  Locally create a CIM_IEEE8021xSettings object and insert the relevant parameters (AuthenticationProtocol, InstanceID, Username, etc.).

3.  Get the endpoint references of the AMT_PublicKeyCertificate instances that represent the CA and client certificates. See Add a Public Key Certificate.

4.  Invoke AMT_WiFiPortConfigurationService.AddWiFiSettings, with the saved reference to CIM_WiFiEndpoint, the locally defined CIM_WiFiEndpointSettings and CIM_IEEE8021xSettings objects, and the certificate references as inputs. The method returns a reference to the new profile and the new CIM_IEEE8021xSettings object.

Click here for a snippet demonstrating this step

You can execute this snippet by inserting it into the execution template found here.

  

$wifiPortConfigurationServiceRef = $wsmanConnectionObject.NewReference("SELECT * FROM AMT_WiFiPortConfigurationService WHERE Name='Intel(r) AMT WiFi Port Configuration Service'")

$wifiEndpointRef = $wsmanConnectionObject.NewReference("SELECT * FROM CIM_WiFiEndpoint WHERE Name='WiFi Endpoint 0'")

$wifiEndpointSettingsInstance = $wsmanConnectionObject.NewInstance("CIM_WiFiEndpointSettings")

$wifiEndpointSettingsInstance.SetProperty("AuthenticationMethod", "5") # 5 = WPA IEEE802_1x

$wifiEndpointSettingsInstance.SetProperty("ElementName", "Wireless-Profile-802_1x")

$wifiEndpointSettingsInstance.SetProperty("InstanceID", "Wireless-Profile-802_1x")

$wifiEndpointSettingsInstance.SetProperty("EncryptionMethod", "3") # 3 = TKIP

$wifiEndpointSettingsInstance.SetProperty("Priority", "6")

$wifiEndpointSettingsInstance.SetProperty("SSID", "Wireless-API")

 

$ieee8021xSettingsInstance = $wsmanConnectionObject.NewInstance("CIM_IEEE8021xSettings")

$ieee8021xSettingsInstance.SetProperty("AuthenticationProtocol", "0") # 0 = EAP-TLS

$ieee8021xSettingsInstance.SetProperty("ElementName", "Wireless-Profile-802_1x")

$ieee8021xSettingsInstance.SetProperty("InstanceID", "Wireless-Profile-802_1x")

$ieee8021xSettingsInstance.SetProperty("Username", "wireless_user")

 

$inputObject = $wifiPortConfigurationServiceRef.CreateMethodInput("AddWiFiSettings")

$inputObject.SetProperty("WiFiEndpoint", $wifiEndpointRef)

$inputObject.SetProperty("WiFiEndpointSettingsInput", $wifiEndpointSettingsInstance)

$inputObject.SetProperty("IEEE8021xSettingsInput", $ieee8021xSettingsInstance)

# $publicKeyCertificateRef is an EPR to the AMT_PublicKeyManagementService object created by the 'Add a Public Key Certificate' use case.

$inputObject.SetProperty("ClientCredential", $publicKeyCertificateRef)

$outputObject = $wifiPortConfigurationServiceRef.InvokeMethod($inputObject)

$returnValue = $outputObject.GetProperty("ReturnValue")

if($returnValue -like "0")

{

    $wifiEndpointSettings = $outputObject.GetProperty("WiFiEndpointSettings")

    $ieee8021xSettings = $outputObject.GetProperty("IEEE8021xSettings")

}

 

 

Additional Information

Since the name of a profile uniquely identifies it, Intel AMT rejects attempts to create a duplicate profile name.

Instance Diagram

Classes Used in This Flow

SDK Sample

Located at:<SDK_root>\Windows\Intel_AMT\Samples\WS-Management\WirelessConfiguration

 

See Also:

   Wireless Profile Parameters

Copyright © 2006-2013, Intel Corporation. All rights reserved.