This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | param([string]$MOEVersion) | |
| New-Item HKLM:SOFTWARE\MOE | |
| New-ItemProperty HKLM:SOFTWARE\MOE -Name Version -Value "$MOEVersion" | |
| $computerDetails = Get-WmiObject Win32_ComputerSystem | |
| # clean up the manufacturer name | |
| $manufacturer = $($computerDetails.Manufacturer) | |
| $manufacturer = $manufacturer.Replace(" Inc.", "") | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | ' For use during the WinPE task sequence phase to get the serial number of the computer | |
| Set taskSequenceEnvironment = CreateObject("Microsoft.SMS.TSEnvironment") | |
| Set wmiService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\.\root\cimv2") | |
| Set systemEnclosureCollection = wmiService.ExecQuery ("Select * from Win32_SystemEnclosure") | |
| For Each systemEnclosureEntry in systemEnclosureCollection | |
| taskSequenceEnvironment("SerialNumber") = systemEnclosureEntry.SerialNumber | |
| Next | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # get a list of licenses and plans | |
| Get-MsolAccountSku | foreach { Write-Output "$($_.AccountSkuId)"; foreach ($status in $_.ServiceStatus) { Write-Output $status } } | |
| # example to modify a user | |
| $license = New-MsolLicenseOptions -AccountSkuId "tenant:STANDARDPACK" -DisabledPlans "MCOSTANDARD,EXCHANGE_S_STANDARD" | |
| (Get-MsolUser)[1] | Set-MsolUserLicense -AddLicenses "tenant:STANDARDPACK" | |
| (Get-MsolUser)[1] | Set-MsolUserLicense -LicenseOptions $license | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | $config = @{ | |
| AllNodes = @( | |
| @{ | |
| NodeName = "localhost"; | |
| PSDscAllowPlainTextPassword = $true | |
| } | |
| )} | |
| Configuration SequencerTemplate | |
| { | 
NewerOlder