I use a couple components to make this work. $output = $null $sourcefile = $null # get needed values to do the work # needed values in the sourcefile: AssetName Serialnumber ADDESCRIPTION SystemSKU $sourcefile = Get-Content C:\temp\source.csv | sort-object $_. Ive been able to query lansweeper from powershell and have integrated it into several scripts. So after i did all this, it was time to script this. We use the description field to identify where the device is at (physically). So all that was left for me to do now, it to do this for all the devices in the by Lansweeper created CSV.īecause a devicename itself doesn’t really tell me where the device is at, i also included the Active Directory “Description” field (data that is also retrieved and stored by Lansweeper). Open PowerShell with administrative privileges. I manually browsed to this URL and found out that this gave me an awesome JSON-formatted overwiew of my device information. So looking for the XHR it gave me this URL : I am not sure that I can use the get-content command because of our execution policy. Note: The GetPendingReboot PowerShell script was modified to fit the needs of this configuration item, its suggested to use the provided CI instead of creating a new one. So using Chrome and their integrated webtools (F12), i was able to capture the URL that was sent to their server to retrieve my requested data. To use Lansweeper I need to do this from the command line. We created a new Configuration Item that will use a PowerShell script for the compliance check. Here is how: First Step (Load PS1 file): Text powershell.exe -executionpolicy bypass -file '\\SERVER\Get-RDPCertificate. So I am trying to load and run and output the results thorugh CMD. But the URL above wasn’t what was getting sent as a request. Lansweeper for Software Asset Management: Automate your software asset discovery and eliminate blind spots to save costs and minimize compliance risks. To use Lansweeper I need to do this from the command line. The SKU is for the cases where the website asks for it (for some unknown reason it does).īefore going into scripting itself, i started out by doing a manual check, just to see how things work. AssetName Serialnumber ADDESCRIPTION SystemSKU D08W0BT CZC6437K7Z HR L1G76AV
0 Comments
Leave a Reply. |