Whats new in Windows 10 Spring Creators update 1803?

I’ll bring some things up that are new in 1803, that I think it will be useful in daily work

Diagnostics & Feedback

In Europe its a lot of talk about GDPR and security about the personal information. So when they are focusing on this part, I think many companies are very happy about this feature.
In Settings\Privacy\Diagnostics & Feedback you can see that they added Basic
Capture.PNG

It means that they dont send anything about your personal information and so on.

They even added an app “Diagnostic data viewer” that you can see what information sends to microsoft and the information that stays on the machine. So now they trying to be as transparancy as posible.
You can find the app just “Settings\Privacy\Diagnostics & Feedback aswell”, just scroll down.
2018-04-26 09_30_08-Windows 10 Spring Creators Update.flv - VLC media player.png

2018-04-26 09_31_29-Windows 10 Spring Creators Update.flv - VLC media player.png

Fun fact with this is that they are live data for example go and google something and go back here and you see what’s happening on the machine.

https://docs.microsoft.com/en-us/windows/configuration/configure-windows-diagnostic-data-in-your-organization

Focus Assist

If you are working very deep with something, like writing a blog post or just want not to get interrupted by colleagues.
You can set automatic rules, let say every morning from 08.00 – 09.00 I don’t want to get notifications and so on.
If you duplicating your display, let say you have an important presentation that you don’t wanna get spammed by colleagues, also possible to make a rule like this.2018-04-26 09_41_41-Windows 10 Spring Creators Update.flv - VLC media player.png

If you go to the Priority list, you can specify people that you wanna let through even you are on “focus assist mode”
2018-04-26 09_44_47-Windows 10 Spring Creators Update.flv - VLC media player.png

Task View

They have rebuild this button totally, you can find this in the left corner of your screen

veiwlist.png
The new one is working like this: It remembers what windows you have opened for as long as one month, so if you accidentally closed something you can go back here, and quickly find it.
On the right side you see a Timeline, so you can easily scroll down to a specific date.
2018_04_26_09_52_09_Windows_10_Spring_Creators_Update.flv_VLC_media_player.png

That was all, for now, then its a bunch of other features but I think these three sticks out from the rest

Thank you for reading

/Pontus

Create a Hyper-V Machine with one click

Hey there!

If you working with Client Management, you probably have some test-pc´s on your machine, Hyper-V machines maybe?

So Ive made a script that creates Hyper-V machines pretty sweet actually.

Let me go through the script here.

1. First, you need to modify the script, Go to the #Modify part of the script, change it so it fits your computer.

2 If you dont know what NetworkSwitch that you uses, you can find it Here
(In my case im using “Bridge”
2018-01-23 11_30_39-Hyper-V Manager.png
2. Then save it and run the script.


Param(
[Parameter(mandatory=$True,HelpMessage="Whats the name of the VM?")]
[ValidateNotNullOrEmpty()]
$VM_Name,

[parameter(mandatory=$True,HelpMessage="How much memory do you want in GB?(Example 4)")]
[ValidateNotNullOrEmpty()]
$VMMemoryinGB,

[parameter(mandatory=$True,HelpMessage="How large HD in GB (Example 80)")]
[ValidateNotNullOrEmpty()]
$HDsizeinGB
)

Function Select-FolderDialog
{
    param([string]$Description="Select a Folder that you wanna save your vhdx files",[string]$RootFolder="Desktop")

 [System.Reflection.Assembly]::LoadWithPartialName("System.windows.forms") |
     Out-Null     

   $objForm = New-Object System.Windows.Forms.FolderBrowserDialog
        $objForm.Rootfolder = $RootFolder
        $objForm.Description = $Description
        $Show = $objForm.ShowDialog()
        If ($Show -eq "OK")
        {
            Return $objForm.SelectedPath
        }
        Else
        {
            Write-Error "Operation cancelled by user."
        }
    }

# You can modify here if you always want to save your machines to a specific folder.
$Folderpath = Select-FolderDialog
$Path = "$Folderpath\$VM_name.vhdx"

#Modify
#Change $NetworkSwitch to your standard switch in hyper-v, mine is Bridge
$NetworkSwitch = "Bridge"

#Creating Virtual machine
New-VM -Name "$VM_Name" –MemoryStartupBytes ([int64]$VMMemoryinGB*1024*1024*1024) -NewVHDPath $Path -NewVHDSizeBytes ([int64]$HDsizeinGB*1024*1024*1024) -Generation 2 -SwitchName $NetworkSwitch

#Change boot Order 'Network THEN Hardrive'
$vmNetworkAdapter = get-VMNetworkAdapter -Name "Network Adapter" -VMName "$VM_Name"
$vmHardDiskDrive = get-VMHardDiskDrive -VMName "$VM_Name"
Set-VMFirmware "$VM_Name" -BootOrder $vmNetworkAdapter, $vmHardDiskDrive

Start-vm $VM_name

& vmconnect.exe localhost $VM_name

Write-host "Succefully Created VM, Starting.."  -ForegroundColor Green

( You can also download the script here New-VM )

3. When you running the script, you gotta answer some questions. (Type !? for help)

4 (Optional) If you want you could just run the script with some parameters like this or you could run the script in the console
2018-01-22 10_41_34-Administrator_ Windows PowerShell ISE.png

5. Answer all of them like this.
2018-01-22 10_27_28-Administrator_ Windows PowerShell ISE.png

6. Then the Machine will start, and you are good to go.
2018-01-22 10_28_49-Edit Post ‹ PONTUSWENDT.BLOG - Client Management — WordPress.com.png

7. Done

Good luck

/Pontus

How to uninstall or remove SCCM client

Hey! I work with a company, that the customers, come and go pretty much. So sometimes they gonna install the CM-agent and sometimes some customers leaves. Then we need to uninstall the CM-Agent remotely of course! God forbidden manually!

You need
* Server 2008 R2 or above
* Windows 7 With PowerShell 3.0 installed or above
* CM2012

1. Create a Collection.

2. Create a Configuration item

2.1 Then the “Setting step”, Modify like below

2.2 Choose Script like this:
2017-12-19 16_38_23-sql.invidjkp.local - ASG-RemoteDesktop 2017 - SCCM02.png
2.3 Edit “Discovery Script”: Then you post in this:


function Get-ccmexec-service
{
    [CmdletBinding()]
    param ()

    Begin
    {
    }
    Process
    {
    Try {
    Get-Service -Name CcmExec |
        ForEach-Object {
            If($_.Name -eq "none") {
                $State = 0 }
            ElseIf($_.Name -eq "ccmexec") {
                $State = 1}
            }

     }
   catch {
   # Error handling

   }
   $state

    }
    End
    {
    }
}
Get-ccmexec-service

2017-12-19 16_42_42-sql.invidjkp.local - ASG-RemoteDesktop 2017 - SCCM02.png
2.4 Then “Remediation Script” you post in this:
C:\Windows\ccmsetup\ccmsetup.exe /uninstall
2017-12-19 16_43_04-sql.invidjkp.local - ASG-RemoteDesktop 2017 - SCCM02.png
2.5 Then in the Compliance Rules tab, Add this:
2017-12-19 16_44_14-sql.invidjkp.local - ASG-RemoteDesktop 2017 - SCCM02.png
2.4. The Finish the Configuration Item Wizard.

3. Create a Baseline to this, And put the deployment to your Collection.

4. And you are Done

Good Luck

/Pontus

Add a language pack to your Reference image

Add a language pack these days can be done in different ways, I recommend do it by DISM. Here´s a guide how you can do it

What you need
* Powershell 3.0 or later.
* ADK
* Windows 10 Pro 1703 or later

Ok, Now we need to put some files on the right place to begin, Start to create a folder structure like this.
2017-11-21 10_56_21-Add-Language-pack.png

1. Start with ISO folder.
1.1 Download the ISO from Voluming Licensing Service Center or a Windows 10 EVAL ( https://www.microsoft.com/en-us/evalcenter/evaluate-windows-10-enterprise)
1.2 Just right click on the ISO and Mount
1.3 Copy all the files from the Mounted ISO to your ISO folder.
1.4 Now it gonna look like this.
2017-11-21 11_07_49-ISO.png

2. Language_files
2.1 Download the CAB file here: https://www.itechtics.com/windows-10-version-1709-language-packs-direct-download-links/#Swedish
2.2 Copy the CAB file the the “Language_files” folder.
2.3 Now its gonna look like this.
2017-11-21 11_16_16-Language_files.png

3. Scratch its just a empty folder.
2017-11-21 11_17_24-Scratch.png

4. temp_ISO also is a emtpy folder
2017-11-21 11_17_54-temp_ISO.png

5. Lets start the scripting. Open up the Powershell script.
You can find it Here:Add-Language-pack

6. Open up the script and we need to do some Editing.

7. Edit the variables so it fits your environment.
2017-11-21 11_23_12-Administrator_ Windows PowerShell ISE.png

8. Run your variables
2017-11-21 11_25_20-Namnlös - Paint.png

9. Now in Windows 10 1709 its same ISO for PRO, PRO N, Enterprise, Enterprise N etc. So we need to figure out what Index we want to modify
2017-11-21 11_27_07-Kalkylatorn.png
2017-11-21 11_27_31-Administrator_ Windows PowerShell ISE.png

10. In my case, I want to modify Windows 10 Enterprise N, Run the variable
2017-11-21 11_28_23-Kalkylatorn.png

11. Now its time for some Action, Run the next line, to “#Mount your ISO with that specific index and put it in a temporary folder.”
2017-11-21 11_29_35-Kalkylatorn.png
2017-11-21 11_30_42-Administrator_ Windows PowerShell ISE.png
2017-11-21 11_33_52-Administrator_ Windows PowerShell ISE.png

11. Then run the next one, #Time to Add the language pack
2017-11-21 11_35_13-Administrator_ Windows PowerShell ISE.png
2017-11-21 11_35_48-Administrator_ Windows PowerShell ISE.png
2017-11-21 11_37_58-Administrator_ Windows PowerShell ISE.png

12. Time to run the next one. “#Do changes in the mounted Image”
2017-11-21 11_39_16-.png
2017-11-21 11_40_47-Administrator_ Windows PowerShell ISE.png
2017-11-21 11_41_04-Administrator_ Windows PowerShell ISE.png

13. Ok, Now the last command, #Unmounting the ISO file and saving it..
2017-11-21 11_41_44-Kalkylatorn.png
2017-11-21 11_45_56-Administrator_ Windows PowerShell ISE.png
2017-11-21 11_46_37-Administrator_ Windows PowerShell ISE.png

14. The language pack is now into the .ISO file, and you have succeeded to do your mission.

BUT

15. We need to modify the answer file, if you want to deploy this with MDT/SCCM, otherwise, it will choose EN because its “standard” on the ISO file

16. Open Windows System Image Editor on your machine ( you need ADK to have this program installed)

17. Right click on Select a Windows image or catalog files – Select Windows Image..
2017-11-21 11_51_21-Namnlös - Paint.png

18. Choose the .ISO file that you just modified.
“C:\temp\Add-Language-pack\ISO\sources\install.wim”
2017-11-21 11_52_33-Windows System Image Manager.png

19. Choose the Index that you wanna modify, In My case Windows 10 Enterprise N
2017-11-21 13_09_55-Untitled_ - Windows System Image Manager.png

20. Rightclick “Create or open an answer file” then New Answer file.
2017-11-21 13_11_05-Namnlös - Paint.png

21. Click on Components then “amd64_Windows-International-Core_10.0.16299.15_neutral then Add Settings to Pass 4 specialize
2017-11-21 12_57_54-Namnlös - Paint.png

21. Change Settings like below
InputLocale sv-SE
Systemlocale sv-SE
UILanguage sv-SE
UILanguageFallback en-US
UserLocale sv-SE
2017-11-21 12_59_35-Untitled_ - Windows System Image Manager.png

22. Click on Components then “amd64_Windows-International-Core_10.0.16299.15_neutral then Add Settings to Pass 7 OOBesystem
2017-11-21 13_17_38-Namnlös - Paint.png

22. Change Settings like below
InputLocale sv-SE
Systemlocale sv-SE
UILanguage sv-SE
UILanguageFallback en-US
UserLocale sv-SE
2017-11-21 13_02_49-Untitled_ - Windows System Image Manager.png

23. Save the file and name it like answer.xml or something like that.

24. Now we are done, You have a proper ISO to work with, and a answer file that will change the language while deploying your machines.

/Pontus

ZTIWindowsupdate has run And Failed too Many Times. Microsoft – Printer 6/21/2006 12:00:00 AM 10.0.15063.0

Recently I discovered a really annoyoing issue when:
Error message: ZTIWindowsupdate has run And Failed too Many Times. Microsoft – Printer 6/21/2006 12:00:00 AM 10.0.15063.0
Deploying with MDT
NO WSUS
Both Windows 10 1703 and Windows 10 1709

Here´s the issue, when running the Windows update step in the MDT, it hangs on some Updates
2017-11-06 16_05_17-TEST F12 på PONWEN-LAP01 - Anslutning till virtuell dator.png

2017-11-06 16_11_41-TEST F12 på PONWEN-LAP01 - Anslutning till virtuell dator.png

Biggest question, What it is?
Its two drivers,
Microsoft to PDF
XPS Services

And somehow it causes the Windows update to retry, retry and retry. Its simply cant succeed. These updates are not in the WSUS just when you going to microsoft.com

My solution is to “Disable” the feature before the updates, and “Enable” them after the updates. Because of bad drivers from Microsoft.

The solution:
1. First, Open the Task Sequence that you are deploying.

2. Add a Step into the task sequence. (Make sure you add it After Windows is Installed, Add it just before Windows update is running.)
Add\Roles\Uninstall Roles and Features
2017-11-06 15_39_59-sql.invidjkp.local - ASG-RemoteDesktop 2017 - invjkp-mdt01.png

3. Check Microsoft Print to PDF
2017-11-06 15_42_39-sql.invidjkp.local - ASG-RemoteDesktop 2017 - invjkp-mdt01.png

4. Check XPS Services
2017-11-06 15_48_20-sql.invidjkp.local - ASG-RemoteDesktop 2017 - invjkp-mdt01.png

5. Then We add a new step in the task sequence. Pretty down in the task sequence. Just before “Apply Local GPO Package”
Add\Roles\Install Roles and Features
2017-11-06 15_51_07-sql.invidjkp.local - ASG-RemoteDesktop 2017 - invjkp-mdt01.png

6. Check Microsoft Print to PDF
2017-11-06 16_12_58-sql.invidjkp.local - ASG-RemoteDesktop 2017 - invjkp-mdt01.png

7. Check XPS Services
2017-11-06 16_17_41-sql.invidjkp.local - ASG-RemoteDesktop 2017 - invjkp-mdt01.png

8. Then apply

9. Update your Deploymentshare and try again. On my machine, it solved the issue. Good luck!
doen.png

/Pontus

CI – Get-ServicePackMajorVersion

Hey!
Recently I got and a mission to inventory the ServicepackMajorversion on our servers. So ive made a script that you can use in a CI if you want.

Discovery Script


function Get-ServicePackMajorVersion
{
    [CmdletBinding()]
    param ()

    Begin
    {
    }
    Process
    {
    Try {

# Get Operating System Info
$sOS =Get-WmiObject -class Win32_OperatingSystem -computername Localhost

foreach($sProperty in $sOS)
{}
        ForEach-Object {
            If($sProperty.ServicePackMajorVersion -match "0") {
                $State = 0}
            ElseIf($sProperty.ServicePackMajorVersion -match "1") {
                $State = 1}
            }
     }
   catch {
   # Error hantering
   }
   $state

    }
    End
    {
    }
}
Get-ServicePackMajorVersion

Compliance Rule
Equals 1 ( which is “a Service pack is installed”)
Compliance.png

Good luck!

/Pontus