Uploading Emergency locations using CSV

%3CLINGO-SUB%20id%3D%22lingo-sub-920764%22%20slang%3D%22en-US%22%3EUploading%20Emergency%20locations%20using%20CSV%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-920764%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20our%20organisation%20we%20are%20updating%20our%20list%20of%20emergency%20locations%20in%20the%20admin%20section%20of%20Teams.%3C%2FP%3E%3CP%3EWe%20were%20able%20to%20export%20the%20current%20out%20of%20date%20list%20using%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EGet-CsOnlineLisLocation%20%7C%20Select-Object%20companyname%2C%20description%2C%20HouseNumber%2C%20Streetname%2C%20City%2C%20p%3C%2FSPAN%3E%3CBR%20%2F%3E%3CSPAN%3Eostalcode%20%7C%20Export-Csv%20c%3A%5Ctemp%5Cskypelocation.csv%20-NoTypeInformation%20-Append%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWe%20now%20have%20the%20correct%20up%20to%20date%20list%20populated%20in%20a%20CSV%20and%20we%20would%20like%20to%20know%20if%20its%20possible%20to%20import%20this%20back%20to%20teams%3F%3C%2FP%3E%3CP%3EThere%20is%20no%20import-CsOnlineLisLocation%20command%20so%20I%20am%20unsure%20if%20this%20is%20even%20possible.%3C%2FP%3E%3CP%3EIs%20there%20a%20way%20to%20use%20import-csv%20and%20then%20pipe%20it%20into%20the%26nbsp%3BNew-CsOnlineLisLocation%20command%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESomething%20like%20the%20following%3F%3C%2FP%3E%3CP%3EImport-Csv%20-Path%20%3CINPUT%20csv%3D%22%22%20file%3D%22%22%20path%3D%22%22%20and%3D%22%22%20name%3D%22%22%20%2F%3E%20%7C%20foreach%20%7BNew-CSOnlineLisLocation%20-Location%20%24_.Location%20%E2%80%93PostalCode%20%24_.PostalCode%7D%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-920764%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EPowerhsell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-967359%22%20slang%3D%22en-US%22%3ERe%3A%20Uploading%20Emergency%20locations%20using%20CSV%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-967359%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F429751%22%20target%3D%22_blank%22%3E%40danb1967%3C%2FA%3E%26nbsp%3Bproviding%20some%20sample%20scripts%2Ftool%20for%20this%20is%20on%20our%20to%20do%20list%26nbsp%3B%20but%20don't%20have%20this%20at%20the%20moment.%26nbsp%3B%20If%20you%20are%20doing%20this%20for%20dynamic%20emergency%20calling%2C%20make%20sure%20you%20add%20geo-codes%20to%20the%20addresses%20as%20they%20are%20needed.%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi 

In our organisation we are updating our list of emergency locations in the admin section of Teams.

We were able to export the current out of date list using 

Get-CsOnlineLisLocation | Select-Object companyname, description, HouseNumber, Streetname, City, p
ostalcode | Export-Csv c:\temp\skypelocation.csv -NoTypeInformation -Append

 

We now have the correct up to date list populated in a CSV and we would like to know if its possible to import this back to teams?

There is no import-CsOnlineLisLocation command so I am unsure if this is even possible.

Is there a way to use import-csv and then pipe it into the New-CsOnlineLisLocation command?

 

Something like the following?

Import-Csv -Path <Input CSV File Path and Name> | foreach {New-CSOnlineLisLocation -Location $_.Location –PostalCode $_.PostalCode} 

 

 

1 Reply

@danb1967 providing some sample scripts/tool for this is on our to do list  but don't have this at the moment.  If you are doing this for dynamic emergency calling, make sure you add geo-codes to the addresses as they are needed.