Open Windows PowerShell ISE and run the below script:

  1. Add - PSSnapin Microsoft.SharePoint.PowerShell
  2. function CreateCustomList($siteCollectionUrl, $listName) {
  3. $spWeb = Get - SPWeb - Identity $siteCollectionUrl
  4. $spTemplate = $spWeb.ListTemplates["Custom List"]
  5. $spListCollection = $spWeb.Lists
  6. $spListCollection.Add($listName, $listName, $spTemplate)
  7. $path = $spWeb.url.trim()
  8. $spList = $spWeb.GetList("$path/Lists/$listName")
  9. #adding the field type(Number) to the list
  10. $spFieldType = [Microsoft.SharePoint.SPFieldType]::Number
  11. $spList.Fields.Add("Area", $spFieldType, $false)
  12. #adding the field type(Number) to the list
  13. $spFieldType = [Microsoft.SharePoint.SPFieldType]::Number
  14. $spList.Fields.Add("Population", $spFieldType, $false)
  15. $spList.Update()
  16. }
  17. $siteCollectionUrl = "http://moss13:1111/"
  18. $listName = "Continents"
  19. CreateCustomList $siteCollectionUrl $listName

Next Go to the site ->Settings->Site Contents.

Click on created custom List (Continents).

You can add the value in the fields, you have defined in the script.