Posts by MB

Diskpart to the rescue

In my work, I recently heard that more often new devices (desktop’s/laptop’s) fails in the beginning of the OSD (OS deploy) because of something is wrong with the partitions on the hard drive. The Boot-image can’t download policys or files to the disk, so it fails. Often the IT-person needs to boot the device and re-partition the disk, and after that start the OSD again, and it will work. I have not done some examination on why it fails. The OEM’s OS works on the device/disk. But I have a workaround, or it’s not mine workaround. I did find it on the Internet for a few years ago, so I don’t remember whos to credit (I’m sorry).

But this is the workaround I have.

Begin by creating a txt-file with the content of commands for diskpart we will be using later (this is for UEFI-disks).
sel disk 0 clean convert gpt cre par efi size=200 assign letter=s format quick fs=FAT32 cre par msr size=128 cre par pri assign letter=c format quick fs=NTFS exit
Save the file (I have named my file uefi_disk.txt ), and put it on your SCCM Package-share. Then you will need to create a Package in your SCCM-console, where you will point out the source files (where you saved your new .txt-file). You don’t need to create a program, just select “Do not create a program” and click next, and just go on and finish the wizard. Here is two ways to use this. The first one, if you boot your PC’s from a boot-media (CD/USB), you can create a new boot-media and put in a prestart command to run diskpart. So go one and create a new Task Sequence Media if you choose this way. Mark Boot media, and Next Continue the wizard, entering your “SCCM-info” till you come to Customize the task sequence media. Here you will need to tick the Enable prestart command checkbox, and also enter Command line: cmd.exe /c diskpart /s uefi_disk.txt <– or the name you gave your .txt-file You must also select the Diskpart package you created earlier, and point out your Distribution point. After that, finish the wizard, and you are now ready to boot using your new boot-media.
The other one is to put this in your boot-image (if you PXE-boot your devices, choose this). Using this way the prestart command will always run (when using TS using this boot-image), and you don’t need to create a new boot-image with this prestart command. Go to your Boot-image in the SCCM-console, and right-click it and choose Properties. Go to the Customization tab, and tick the Enable prestart command checkbox, and also enter Command line: cmd.exe /c diskpart /s uefi_disk.txt <– or the name you gave your .txt-file Klick Ok, to save and re-distribute your boot-image, and after that your done.
When you are here, click Next And diskpart will run After diskpart is finished, you can choose your TS, and continue your installation

What a wonderful beginning of the year?

Meltdown/Specter, 2 serious vulnerabilities.
Meltdown vulnerability is “only” on Intel’s CPUs, while Spectre is found in addition to Intel’s CPUs also with AMD and ARM CPUs.
Info: A Simple Explanation of the Differences Between Meltdown and Spectre

Many operating system manufacturers are in the process of developing software updates to protect against the Meltdown vulnerability. But due to the fact that information about these vulnerabilities leaked to the media prematurely, more or less many manufacturers were forced to release their updates prematurely, which in turn could have caused problems for many users.
There have been reported problems for Microsoft Azure customers after Microsoft updated their system.
Other users who installed updates have been affected by BSOD (Windows crashes, displays “blue screen”), this in relation to the fact that some AntiVirus products make unsupported calls to Windows kernel memory. Here, one must ensure that the AntiVirus is supported/updated, and also ensure that the following registry key is in the registry before installing the update:

Value Name ="cadca5fe-87d3-4b96-b7fb-a231484277cc"

More information in the following links:

Important information regarding the Windows security updates released on January 3, 2018 and anti-virus software.

List of AntiVirus products and how they “support” the Windows update.

Windows Server guidance to protect against speculative execution side-channel vulnerabilities.

However, as this is hardware vulnerabilities, it may not be enough to update the operating system only, but you must also update the firmware for the hardware.
US-CERT has put together a list of manufacturers who have information/recommendation about their hardware:

Infomaniak offering students free Web and Mail hosting

Swiss web host Infomaniak is offering students a chance to receive free professional Web and Mail hosting during their higher education. This full offer, which is unique in Europe, has a dual goal of promoting both the acquisition of digital skills and the creation of digital-related projects.

Read more about this great opportunity, and how to grab it: https://news.infomaniak.com/en/free-hosting-for-students/

Clear Clipboard when locking Windows

First, let me just say that I’m no security expert, but safety is something that I find interesting.

Today I saw the posts by Hasain Alshakarti on Facebook, Hasain had posted a link to Accessing the clipboard from the lockscreen into Windows 10 # 2.
Interestingly, Microsoft should have already blocked that security risk.

But you can prevent this yourself, so that Clipboard  is emptied when you lock Windows. No thirdparty software is needed.

Start Task Scheduler
Click on Create Task... under Actions, Task Scheduler Library in the right task pane (or right-click on Task Scheduler Library folder)
On General tab ->
Name: Clear Clipboard 
On Triggers tab ->
Click on New.. button
Under Beging the task, choose: On workstation lock, and click Ok button
Under Actions tab ->
Click on New.. button
Under Program/script, write: cmd.exe
Under Add arguments (optional): write: /c "echo off | clip" and click Ok butoon
Click on Ok button again, and you are done.

Cant turn on RSAT (0x80073701) in Windows 10

rsat-2For about 10 days ago, I tryed to install RSAT (Remote Server Administration Tools) on my work computer.
I downloaded the latest version, WindowsTH-RSAT_WS2016-x64.msu and run the installation. But when I went to turn RSAT on, I got the error message:

The referenced assembly Could not be found.
Error code 0x80073701
Tell me how to solve this problem

Unfortunately, Microsoft’s solution was not the right one for me.

But today (10 days later, and a variety of attempts to activate the RSAT) so I got to it.

I took the downloaded file, WindowsTH-RSAT_WS2016-x64.msu and packed it up (using 7-zip) to C:\RSAT
I started PowerShell as Administrator and went to the path: C:\RSAT and wrote:
DISM /Online /Add-Package /PackagePath:C:\rsat\WindowsTH-KB2693643-x64.cab

After DISM (Deployment Image Servicing and Management tool) run through, I also execute .\ Rsatcustominstaller.exe in the PowerShell window.

A restart later, and RSAT is in action.


YouTube to Sonos?

sonoscastFirst day of the holiday and I nailed it. At last we can look at music videos on YouTube, and play the sound in our Sonos speakers. The only thing I had to do was to complete our Sonos system with a Google Chromecast Audio.
But yes. It’s not just YouTube we can cast to Sonos, we can of course also cast sound from Netflix, HBO and everything else possible sound from our computers and mobile devices. And tomorrow I will to cast the sound of British GP (Formula 1), I can’t wait. 🙂

Windows Defender Scheduled Scans Drains Laptop Battery

I recently received a question whether it is possible to set Windows Defender to stop a scheduled scan on a laptop that was on AC power when the scheduled scan started, but later switchs to run on battery (we dont want to drain the battery).
I have Googled like crazy for days, but my googlefu has not been sufficient. I have looked through group policy’s again and again, but no, I can not find the solution.
I have also not seen any such setting in ConfigMgr 1602 that we use at work.

But just now, it hit me. Why not look in the Task Scheduler?
Said and done, and 10 seconds later, the question was resolved.

 Open the Task Scheduler.
 Expand Task Scheduler Library (by clicking on the arrow in front of Task Scheduler Library).
 Expand Microsoft.
 Expand Windows.
 Go down to, and click on Windows Defender.
 Right click on Windows Defender Scheduled Scan, and select Properties.
 Go to the Conditions tab.
 Check the box infront of Stop if the computer switches to battery power.
 Click Ok, and thats it.



Paus i jobbhelgen

jobbhelgHelgjobb står på tapeten denna helg.
Började gårdagen med att ominstallera 15 RDS:er. På dagens agenda står det patchning av servrar för min del, men just nu väntar jag på att kollegorna ska bli klara med brandväggsjobb så att nätverket åter blir tillgängligt och jag kan fortsätta patchningen.

Under tiden så tar jag och bläddrar lite i Deployment Fundamentals, Vol. 6: Deploying Windows 10 Using Microsoft Deployment Toolkit som damp ner i brevlådan igår. Det får gärna ta ett tag med brandväggsjobbet känner jag 🙂 .

Krasslig idag, beställde en bok

dfv6Förkyld, utslagen allmänt gnäll. Men en bok köptes in, Deployment Fundamentals, Vol. 6: Deploying Windows 10 Using Microsoft Deployment Toolkit.
Hoppas på snabb leverans. På något sjukt sätt så tycker jag sådant här är kul, samt att jag råkar kunna använda det i jobbet…

Hoppas nu bara att jag lyckas skrapa ihop hårdvara för att kunna få till lämplig labbmiljö.


Ta bort, eller blockera Appar i Windows 10?

Under tiden jag har labbat med Windows 10 för att kunna skapa en sådan perfekt installations-avbild som möjligt så upptäckte jag att ta bort appar, så som Windows Store, OneDrive, etc inte genererar det bästa resultatet. För hux flux så kan företagets policy ändras och tillåta den borttagna appen. Nej, modifiera Windows så lite som möjligt är det bästa.
Så blockera då?
Ja, det är rätt väg. För det man blockerar kan man oblockera ta bort blockeringen för.

Av Jörgen Nilsson, ccmexec.com kan man lära sig mycket (har en otrolig mängd bokmärken i Chrome från hans blogg).Till exempel hans bloggpost “Blocking built-in apps in Windows 10 using Applocker“. Fungerar jättebra, om man använder Applocker. För den som vill helt radera appar från Windows 10 rekommenderar jag denna bloggpost; Removing built-in Apps from Windows 10 using Powershell.
På företaget jag jobbar på har vi inte använt oss utav Applocker tidigare, och när jag ny följde Jörgens utmärkta tips så blev resultatet först lyckat. Men sedan så hände något, “random” program startade inte, den var blockerad att köras. Jag dubbelkollade, trippelkollade, fyrlingkollade och jämförde inställningar. Det fanns bara en lösning för oss, att ta bort inställningarna jag gjorde i Applocker.
Visst, jag kunde ha fortsätt att “felsöka”. Men tiden att lägga på det och det vi vill blockera gick inte ihop.

Så om man inte vill radera Windows Store eller OneDrive, och man inte kan/vill använda Applocker så går det ju alldeles utmärkt att blockera dessa via GPO i alla fall.

Så här löste jag det (vi vill blockera Windows Store och OneDrive):

  • Först så skapade jag en helt ny GPO, satt ett WMI-filter* på den för att säkerställa att den endast slår mot Windows 10 maskiner.
  • Sedan öppnade jag upp “Windows 10 Policy v1.0 och klickade mig fram till:
    Computer Configuration > Policies > Administrative Templates > Windows Components
  • Väl där, valde jag OneDrive och under där högerklickade jag på Prevent the usage of OneDrive for file storage och valde Edit.
  • Markera Enabled och klicka på Ok- knappen
  • Sedan gick jag nedåt i trädet under Computer Configuration > Policies > Administrative Templates > Windows Components till jag kom till Store
  • Kort och gott, under Store markerade jag Turn off the Store application och valde Edit
  • Markera Enabled och klicka på Ok- knappen

Så var det fixat. Windows Store och OneDrive är blockerade. När företaget ändrar sig, så tar det bara någon minut att oblockera ta bort blockeringen för dessa.

Och när man väl börjar kika på vilka inställningar man kan göra via GPO, så behöver man inte lägga jätte mycket tid på att skapa en egen installations-avbildning.


*WMI-filter för Windows 10:
Namespace: root\CIMv2
Query: select * from Win32_OperatingSystem where Version like ”10.0%” and ProductType=”1″