Issue
Code backup
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
Invoke-Command -ComputerName PC179 -ScriptBlock {
|
||||
Get-ciminstance -class SoftwareLicensingProduct |
|
||||
where {$_.name -match ‘Office 16, Office16O365HomePremR_Subscription5’ -AND $_.licensefamily} |
|
||||
format-list -property Name, Description, `
|
||||
@{Label=”Grace period (days)”; Expression={ $_.graceperiodremaining / 1440}}, `
|
||||
@{Label= “License Status”; Expression={switch (foreach {$_.LicenseStatus}) `
|
||||
{ 0 {“Unlicensed”} `
|
||||
1 {“Licensed”} `
|
||||
2 {“Out-Of-Box Grace Period”} `
|
||||
3 {“Out-Of-Tolerance Grace Period”} `
|
||||
4 {“Non-Genuine Grace Period”} `
|
||||
} } }
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
Get-ciminstance -class SoftwareLicensingProduct |
|
||||
where {$_.name -match ‘Office 16, Office16O365HomePremR_Subscription5’ -AND $_.licensefamily} |
|
||||
format-list -property Name, Description, `
|
||||
@{Label=”Grace period (days)”; Expression={ $_.graceperiodremaining / 1440}}, `
|
||||
@{Label= “License Status”; Expression={switch (foreach {$_.LicenseStatus}) `
|
||||
{ 0 {“Unlicensed”} `
|
||||
1 {“Licensed”} `
|
||||
2 {“Out-Of-Box Grace Period”} `
|
||||
3 {“Out-Of-Tolerance Grace Period”} `
|
||||
4 {“Non-Genuine Grace Period”} `
|
||||
} } }
|
||||
Reference in New Issue
Block a user