Sunday, August 7, 2016

[W10] Cannot sysprep Windows 10 installation




Check sysprep logs to review each modern application that needs to be removed

Remove them from Store program list

or 

  1. Run the Import-Module Appx PowerShell cmdlet.
  2. Run Import-Module Dism.
  3. Run Get-AppxPackage -AllUser | Where PublisherId -eq 8wekyb3d8bbwe | Format-List -Property PackageFullName,PackageUserInformation.

    Notes
    • In the output of this last cmdlet, check the users for whom the package is showing up as Installed. Delete these user accounts from the reference computer, or log on to the computer by using these user accounts. Then, run the cmdlet in step 4 to remove the Appx package.
    • This command lists all packages that were published by Microsoft and installed by any user of that reference computer. Because the computer is to be sysprepped, we assume that these user profiles no longer require the package.
    • If you have manually provisioned apps that belong to other publishers, run the following command to list them:

      Get-AppxPackage -AllUser | Format-List -Property PackageFullName,PackageUserInformation

  4. Run Remove-AppxPackage -Package <packagefullname>.
  5. Remove the provisioning by running the following cmdlet:

    Remove-AppxProvisionedPackage -Online -PackageName <packagefullname>

Sysprep fails after you remove or update Windows Store apps that include built-in Windows images
https://support.microsoft.com/en-us/kb/2769827

[WSRV] Install .NET Framework 3.5 using Dism



Using DISM with Internet connectivity


For an online reference image that can access Windows Update


DISM /Online /Enable-Feature /FeatureName:NetFx3 /All 



Using DISM with no Internet connectivity


DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:d:\sources\sxs

[WSRV] Expand all values in object property


Get-Mailbox mbx001 | Select-Object -ExpandProperty EmailAddresses

https://blogs.msdn.microsoft.com/powershell/2009/09/13/select-expandproperty-propertyname/

Saturday, July 9, 2016

[WSRV] How to removing a pending update that is preventing a successful boot



dism.exe /image:C:\ /cleanup-image /revertpendingactions


remove the file C:\windows\winsxs\pending.xml.

Monday, May 23, 2016

Tuesday, May 10, 2016

[EXO] Download pictures from users


$user = Get-UserPhoto user@domain.com

$user.PictureData | Set-Content "D:\Export\Photo$($user.Identity).jpg" -Encoding byte

Thursday, March 3, 2016

[WSRV] Check which .NET Framework versions are installed


CMDLET:

Get-ItemProperty -Path “HKLM:SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full” | Format-List Release



https://msdn.microsoft.com/en-us/library/hh925568(v=vs.110).aspx



  1. On the Start menu, choose Run.
  2. In the Open box, enter regedit.exe.
    You must have administrative credentials to run regedit.exe.
  3. In the Registry Editor, open the following subkey:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full
    Note that the path to the Full subkey includes the subkey Net Framework rather than .NET Framework.
    System_CAPS_noteNote
    If the Full subkey is not present, then you do not have the .NET Framework 4.5 or later installed.
    Check for a DWORD value named Release. The existence of the Release DWORD indicates that the .NET Framework 4.5 or newer has been installed on that computer.


  1. The value of the Release DWORD indicates which version of the .NET Framework is installed.
    Important
    The following table lists the keys of released versions of the .NET Framework only. It doesn't list the keys of preview or pre-release versions.
Value of the Release DWORD
Version
378389
.NET Framework 4.5
378675
.NET Framework 4.5.1 installed with Windows 8.1 or Windows Server 2012 R2
378758
.NET Framework 4.5.1 installed on Windows 8, Windows 7 SP1, or Windows Vista SP2
379893
.NET Framework 4.5.2
On Windows 10 systems only: 393295

On all other OS versions: 393297
.NET Framework 4.6
On Windows 10 November Update systems only: 394254

On all other OS versions: 394271
.NET Framework 4.6.1
On Windows 10 Anniversary Update and Windows Server 2016: 394802

On all other OS versions: 394806
.NET Framework 4.6.2
On Windows 10 Creators Update only: 460798

On all other OS versions: 460805
.NET Framework 4.7
On Windows 10 Fall Creators Update only: 461308

On all other OS versions: 461310
.NET Framework 4.7.1
On Windows 10 April 2018 Update only: 461808

On all other OS versions: 461814
.NET Framework 4.7.2