Active RDS CALs raport

Jan 23, 2020 16:05


Win2k8

$filePath = "c:\temp\Terminal CALs "

$fileType = ".txt"

$timestamp = get-date -format "dd-MM-yyyy"

$fullPath = $filePath + $timestamp + $fileType

get-wmiobject win32_tslicensekeypack | select typeandmodel,issuedlicenses | Out-File -FilePath $fullPath

Win2k12

$filePath = "c:\temp\Terminal CALs "

$fileType = ".txt"

$timestamp = get-date -format "dd-MM-yyyy"

$fullPath = $filePath + $timestamp + $fileType

Get-WmiObject Win32_TSLicenseKeyPack | select typeandmodel,issuedlicenses | Out-File -FilePath $fullPath

Send-MailMessage -From 'Admin ' -To 'Manager' -Subject 'Remote Licenses' -Body "Sending RDS Per CAL report" -Attachments $fullPath -Priority High -DeliveryNotificationOption OnSuccess, OnFailure -SmtpServer 'exchange.domain.com'

powershell, напоработать

Previous post Next post
Up