#AutoReboot
Explore tagged Tumblr posts
Text
Android Phones to Auto-Restart After 3 Days of Inactivity in New Security Update
Google is tightening up Android security with a newly introduced feature that will automatically reboot devices if they remain locked for three consecutive days. The update, quietly rolled out via Google Play services on Monday, adds the new functionality under the "Security & Privacy" settings.
This automatic reboot is designed to enhance data protection by reverting devices to a more secure state, making it harder for unauthorized access attempts. By restarting the phone after extended inactivity, Android forces it back into what’s known as the “Before First Unlock” state—where sensitive data remains fully encrypted until the user successfully unlocks the device with their passcode.
This feature mirrors a similar move by Apple, which implemented an automatic reboot in iOS last year. Security experts believe the aim is to counteract efforts by forensic tools like Cellebrite or Magnet Forensics, which often try to extract data after a device has been unlocked at least once.
Google has yet to issue an official statement explaining the reasoning behind the feature, but its presence suggests a growing emphasis on proactive, system-level protections against data extraction and brute-force attacks.
0 notes
Text
#dandys world#dandys world fanart#dandys world dandy#astro dandys world#vee dandys world#dandys world sprout#dandys world shelly#polymains#astro x dandy x shelly x sprout x vee#shelly made them all matching scarves btw#+ vees ok she just overheats really fast in cold weather and she autoreboots. dont worey about the snow
263 notes
·
View notes
Text
Install spiceworks ubuntu

#INSTALL SPICEWORKS UBUNTU HOW TO#
#INSTALL SPICEWORKS UBUNTU INSTALL#
#INSTALL SPICEWORKS UBUNTU FULL#
#INSTALL SPICEWORKS UBUNTU SOFTWARE#
#INSTALL SPICEWORKS UBUNTU PASSWORD#
If CPU Temp is not Coming/not accurate in the System Monitor, then run below command in your Terminal/Shell.
#INSTALL SPICEWORKS UBUNTU INSTALL#
sudo apt-get install ubuntu-restricted-extras without this you would not be able to play videos inside the app. Ubuntu-restricted-extras package allows users to install ability to play popular non-free media formats, including DVD, MP3, Quicktime, and Windows Media formats.
App settings for adjust frequencies and measure units.
Realtime Internet speed indicator (Combine upload/download speed).
SYS INFO is a Best GUI looking Application for Monitoring Internet speed with System Monitor Utility. But for further information see paul2019’s comments below.IF APP IS NOT LAUNCHING AFTER INSTALL, THEN RUN CMD BELOW IN YOUR SHELL.** sudo snap remove htop-pro -purge & sudo snap install htop-pro & sudo snap refresh htop-pro & sudo snap install pyqt5-runtime-lite & sudo snap refresh pyqt5-runtime-liteįYI: Be Patient, Sometimes Snap Applications Takes A While To Launch At First Time Installations I am not a linux geek so I cant explain it. Ubuntu 10 changed around some stuff in the init folders. UPGRADE NOTE: If Upgrading Ubuntu from 9 to 10, you will need to re-install fog.
#INSTALL SPICEWORKS UBUNTU HOW TO#
This tutorial should have gotten you to the point where you can start to play with FOG yourself even if you have absolutely NO idea how to run Linux.įrom here you can start creating groups to image, advanced tasks and start shaping things to your environment. Make sure you have enough storage for your images. Verify image by booting computer and making sure everything works. In Host Image select the proper image that you created in the previous step from the dropdown.įrom another machine log onto login with fog/passwordĬlick on active Tasks, and either wait for the PC to check in and autoreboot or Reboot it manually. For dell computers with a utility partition you will HAVE to select multiple partition single disk.Īssign the Image to a host, this will be the image the host uses to restore and deploy from, You can assign this image to as many PCs as you want. Give it a name, description, default storage group, filename, and Image type (choose wisely). This would also be a good time to make sure that PXE is your primary boot option in BIOS, you might need to enable it. Run Setup.exe in the Fogservice folderĪccept defaults (FOG does not like to be installed in locations other than default)Įnter the ip or preferrably the hostname if you created one. Scroll down to number 67 check and give the value pxelinux.0Ĥ. Scroll Down to number 66 check and give the hostname of FOGSERVER Right Click Scope Options -> Configure Options eg I would recommend putting an A record in your DNS called FOGSERVER this will make things easier to remember.ģ. You can now reach this webpage from anywhere on the network where your server is installed by using it’s ip address.
#INSTALL SPICEWORKS UBUNTU PASSWORD#
Gksu gedit /var/It has been noted that you also should change the MYSQL password here while you are at it /opt/fog/service/etc/config.php.Ĭlick to log in. (I like to notify the FOG group, they have made a great product and deserve my feedback, choice is yours here) (will require changing my current DHCP server.) No do not change the default network interface.(you may not get this prompt if you have 1 nic) Set up a DNS IP, just accept the default. You dont need to set up a router IP but I will in case I ever use the server for DHCP. Open Terminal Applications->Accessories->TerminalĬd Desktop (Remember Linux is case sensitive) So go to their website, download the workstation x86 ISO and burn it.Įnter User Information and Computer information, I named mine ‘foghat’ with foguser I wanted a GUI so I went with the desktop Ubuntu, you may want to go with Ubuntu server. I would suggest setting aside about 4 hours to do this, depending on the size of the test PC. Please post feedback, this has potential to be an amazing asset to all of you who are in need of an imaging solution. Use this menu to remove any listed package. In this menu, you’ll be able to click Remove on any application that wish to uninstall.
#INSTALL SPICEWORKS UBUNTU FULL#
To access a full list of installed applications, click on the Installed tab at the top.
#INSTALL SPICEWORKS UBUNTU SOFTWARE#
I have tried to include as many of the video tutorials from their site as I could find… Open the Ubuntu Software application from GNOME’s app launcher. It can also boot the pcs to a memtest utility or a disk utility. This guide will walk you through creating a FOG server from scratch to deployment of an image.įOG is a image management server that can be used for multicasting an image to hundreds of PCs or imaging a single one. This how-to was created by DigitalBlacksmith from the Spiceworks Community Forums. At Canonical, we’ve been doing work to make sure Ubuntu OpenStack deploys on ARM servers as easily as on x86.

1 note
·
View note
Text
DOWNLOAD MATSONIC MS7112C DRIVER
Uploader: Flame File Format: exe Download Type: http Date Added: 13 September, 2019 File Name: matsonic ms7112c driver Price: Free Downloads: 5757 File Size: 23 Mb Operating Systems: Windows NT/2000/XP/2003/2003/7/8/10 MacOS 10/X File Version: 715171257
Fixed Issues: - Fixed some(matsonic ms7112c driver some) DDR Memory run S3 can't resume issue. - Fixed USB3.0 dongle IOT 4. - Fixed when viewing(matsonic ms7112c driver viewing) files/folders in thumbnail layout, random images are not displayed. - Fixes an issue where the Rotate and 3-Finger Flick gestures do not function properly when used on photos. - Fixed there is(matsonic ms7112c driver is) no C1E item in BIOS setup when using Conroe-L CPU. - Bug - Fixed a bug where the replication task could not be configured if the replication target TeraStation was different from the replication source. - Antivirus: Fixed a bug where a virus-infected(matsonic ms7112c driver virus-infected) file path was not displayed correctly when LVM was enabled. - Fixed PXE Lan Boot can't work. - Fixed the issue in the password field from the FW GUI. - Corrected daylight saving settings for AU. - Fixed PSTN voltage detection issue. Users content: Correct behavior of AutoReboot. - Do not load UEFI PXE ROM when CSM enabled. History The following problem has been rectified: - Status Monitor related function sometimes does not operate in Guest Account. Type C:\DELL\DRIVERS\R298797 in the Open textbox and then click OK. Important notice:- All firmware upgrades should be done over a WIRED connection. Improved compatibility with DDR-II module. Remove the data back to the new RAID partition. Improves USB function. Further details can be found in topic number 737-37329· Switching from h. Fix the error for ACL file upload in D-View and APM2 2. Click and download DOWNLOAD EDUP USB ADAPTER ED-1296 DRIVER. Supported OS: Windows 8 Microsoft Windows 8.1 Pro (32-bit) Windows Server 2008 Windows 7 Windows Server 2008 R2 Microsoft Windows 8 (64-bit) Microsoft Windows 8 Enterprise (32-bit) Windows Server 2003 64-bit Microsoft Windows 10 (64-bit) Microsoft Windows 8 Pro (32-bit) Windows Server 2003 32-bit Windows 10 Windows Server 2012 Microsoft Windows 10 (32-bit) Windows 7 32-bit Microsoft Windows 8.1 Pro (64-bit) Microsoft Windows 8.1 Enterprise (64-bit) Windows XP 32-bit Microsoft Windows 8 (32-bit) Windows 7 64-bit Windows 8.1 Microsoft Windows 8.1 (64-bit) Windows Server 2012 R2 Windows Vista 64-bit Windows 2000 Microsoft Windows 8.1 Enterprise (32-bit) Notebook 8.1/8/7 32-bit Notebook 8.1/8/7 64-bit Microsoft Windows 8 Pro (64-bit) Windows 8.1/8/7/Vista 64-bit Windows Server 2016 Windows Vista 32-bit Microsoft Windows 8 Enterprise (64-bit) Windows 8.1/8/7/Vista 32-bit Microsoft Windows 8.1 (32-bit) Windows XP 64-bit Searches: matsonic ms7112c Vax376-axq; matsonic ms7112c driver for Windows 8.1/8/7/Vista 32-bit; matsonic ms7112c driver for Notebook 8.1/8/7 32-bit; matsonic ms7112c driver for Microsoft Windows 8 Pro (64-bit); matsonic ms7112c VPUIH3769; matsonic ms7112c driver for Microsoft Windows 8.1 Pro (64-bit); matsonic ms7112c V37a; matsonic driver ms7112c; matsonic ms7112c VP3769; matsonic ms7112c driver for Windows 7; matsonic ms7112c V VP376-3 Compatible Devices: Ipod; Memory Card; Laptop; Wifi router; USB Hubs; Ipad To ensure the integrity of your download, please verify the checksum value. MD5: 6374ff4c4ed31cb3a55c341fc1a694e7 SHA1: 42287758008c1081e2f05cf08d7fdde8eb3daf46 SHA-256: 5361958214efff7532c7147bf8aeda53654524a854ca8fb05f9e60b9ae4281a7
0 notes
Text
Installing Windows Updates via PowerShell
Firstly you will need version 5 of PowerShell which is apart of Windows 10. Since version 5 you can now download and install modules online from the PowerShell Gallery.
First thing you need to do is confirm the version of PowerShell you have:
$PSVersionTable.PSVersion
If version 5 or above, confirm you are running PowerShell as administrator and continue with:
Install-Module PSWindowsUpdate
Get-Command –module PSWindowsUpdate
Then you will need to register to use the Microsoft Update Service not just the default Windows Update Service.
Add-WUServiceManager-ServiceID 7971f918-a847-4430-9279-4a52d1efe18d
Then run:
Get-WUInstall –MicrosoftUpdate –AcceptAll –AutoReboot
0 notes
Text
حل مشکل تاچ گوشی سامسونگJ7Next مدل J701f سکوریتی u6

حل مشکل تاچ گوشی سامسونگJ7Next مدل J701f سکوریتی u6

حل مشکل تاچ گوشی سامسونگJ7Next مدل J701f سکوریتی u6 ***برای این روش باید FRP خاموش(به وسیله combination ) و oem غیر فعال (با موس و otg ) باشد برای غیر فعال کردن OEM : 1- کامبنیشن رایت کنید 2- فایل فلش با امنیت و سکوریتی u6 فقط قسمت Ap را انتخاب کنید . 3- تیک یوزردیتا را بردارید و سپس فلش نمایید . 4- با استفاده از OTG و موس به قسمت تنظیمات رفته و OEM را خاموش نمایید . حل مشکل تاچ گوشی سامسونگJ7Next مدل J701f سکوریتی u6 را با دو متد حل میکنیم: روش اول توسط کاستوم ریکاوری TWRP: 1.ابتدا قفل گوگل اکانت (frp) را با کامبنیشن off کنید سپس oem را با موس otg خاموش کنید. 2.فلش کنید TWRP براحتی در هر جایی که TWRP در دسترس است ,فلش کنید TWRP از طریق نرم افزار odin و ریبوت خودکار autoreboot را در نرم افزار odin خاموش کنید. 3.بعد از اینکه فلش کردن کامل شد باتری را بردارید و گوشی را در کاستوم ریکاوری قرار دهید. 4.بعد از اکسترکت کردن فایل زیر و فلش کنید فایل boot.img از طریق کاستوم ریکاوری 5.پس از فلش کردن کاستوم ریکاوری گوشی را ریبوت نکنید,فرمت کنید دستگاه را در حالت کاستوم ریکاوری 6.سپس ریبوت کنید گوشی را سرانجام این کار کامل شد و گوشی آماده است برای استفاده از رام رسمی (رام رسمی را دانلود کنید.) نکته: روش دوم بدون استفاده از کاستوم ریکاوری است. روش دوم بدون کاستوم ریکاوری: حل مشکل تاچ گوشی سامسونگ J701F ابتدا شما باید قفل گوگل اکانت frp رو باید خاموش باشد یا oem آنلاک باشد،بدون اینکار این راه حل کار نمیکند. چگونه قفل گوگل اکانت frp را خاموش کنیم؟ توسط فایل کامبنیشن یا موس را از طریق OTG وصل کنید و بقیه مراحل را انجام بدهید . بعد از خاموش کردن frp فایل بوت را دانلود و فلش کنید . بغد از فلش کردن فایل بوت گوشی را یکبار WIPE کنید. نکته: توجه کنید که این راه حل فقط روی رام رسمی کار میکند -ابتدا یک فایل 4 فایله فلش کنید ،سپس دوباره مراحل بالا رو انجام بدید ... Read the full article
0 notes
Text
Watcher GPU mining failed
Some mining tool does not support auto reboot mechanism since GPU mining stoped, that can lead everyone to spend effort to monitor manually and restart if need. So I implement a small watcher , almost everyone prefer watchdog, but I’m not a fan of watchdog and would like to implement myself tool: https://github.com/duymap/autoreboot-gpu-fail-mining. The tool will based on gpu consumption to determine if it does not work on mining or not.
0 notes
Text
Using Azure Custom Script Extension to execute scripts on Azure VMs
With Azure Custom Script Extension you can download and execute scripts on Azure virtual machines. This extension is useful for post deployment configuration, software installation, or any other configuration / management task. Scripts can be downloaded from Azure storage or GitHub, or provided to the Azure portal at extension run time.
In this blog post I'm going to explain how you can use the Azure Custom Script Extension to execute a PowerShell script multiple times on an Azure Windows VM from an Azure Automation Runbook.
Why use the Azure Custom Script Extension?
There are multiple ways to execute a PowerShell script on a Windows Virtual machine in Azure.
PowerShell Remoting
Desired State Configuration script resource
Custom Script Extension
Let's go through each of them.
Ad 1. PowerShell Remoting
The advantages are:
PowerShell Remoting does not need an extra agent or extension installation on VM
With PowerShell Remoting you are able to run a script against multiple VMs a the same time.
PowerShell Remoting also allows an interactive session (not really a use-case for calling a script from an Azure Automation Runbook)
Proven technology. PowerShell Remoting is already available since PowerShell v 2.0.
PowerShell Remoting can be used for running PowerShell scripts and Workflows.
The disadvantages are:
Powershell remoting (WinRM) endpoint is not default configured for ARM Virtual Machines. Extra configuration steps are needed:
WinRM listener on VM needs to be configured.
Firewall port for incoming traffice needs to be opened.
Network Security Group Rule to allow inbound requests needs to be added.
VM needs to have a Public IP Address to remote into the VM.
Credential with permissions on the Azure VM for PowerShell Remoting needed before you can remote into the Azure VM.
Ad 2. Desired State Configuration script resource
The advantages are:
DSC agent is built into windows (there is no agent to install)
DSC agent uses the ‘pull’ model (no ports need to be opened on the Azure VM)
DSC script resource can be rerun at regular intervals by DSC agent.
Success/fail can be monitored via the Azure portal or Azure PowerShell.
The disadvantages are:
DSC script resource only supports native PowerShell scripts. (PowerShell workflow and graphical runbooks cannot be used with DSC)
DSC does not return output streams in the way a Runbook would. (DSC reports success/fail with few (if any) script execution details to Azure).
Ad 3. Custom Script Extension
The advantages are:
No local or domain credential needed to login to Azure VM.
VM does not need to have a Public IP address to be able to remotely connect to VM, like PowerShell Remoting needs.
Simple to implement, not many pre-requisites needed.
The disadvantages are:
The Custom Script Extension needs to be enabled for each VM you want to run your (PowerShell) script on.
The VM needs to have internet access to access the script location Azure storage or GitHub.
Relatively slow. (some PowerShell cmdlets like the Set-AzureRmVMCustomScriptExtension could be blocking the call until it finishes)
Because using the Custom Script Extension was the easiest and fastest way to have a PowerShell Script running on an Azure VM I choose for this option.
In this blog post I'm going to describe how to use the Custom Script Extension for the following scenario.
Scenario:
Trigger Windows Update using the PSWindowsUpdate PowerShell Module from Azure Automation on a Windows Virtual Machine in Azure.
The following high-level steps need to be executed to implement above scenario:
Install PSWindowsUpdate PowerShell Module on the Azure Windows VM.
Create PowerShell script (Install-WindowsUpdate.ps1) to use Get-WUInstall from the PSWindowsUpdate PowerShell Module to get list of available updates, next download and install it.
Store Install-WindowsUpdate.ps1 in Azure Blob Storage Container.
Create an Azure Runbook that updates the Custom Script Extension on a scheduled interval.
Step 1. Install PSWindowsUpdate PowerShell Module on the Azure Windows VM
Connect to Azure Windows VM and install the PSWindowsUpdate Module using the following PowerShell code from an elevated PowerShell prompt:
Install-Module -name PSWindowsUpdate -Scope AllUsers
Remark:
You can also have the Custom Script Extension (PowerShell) script download and install the PSWindowsUpdate PowerShell Module.
Step 2. Create PowerShell script (Install-WindowsUpdate.ps1)
We want to install all Windows Updates which can be achieved with the following command from the PSWindowsUpdate module.
Get-WUInstall -WindowsUpdate -AcceptAll -AutoReboot -Confirm:$FALSE
This command will get list of available updates, next download and install it from Windows Update Server as source. Does not ask for confirmation updates, installs all available updates, does not ask for reboot if needed and does not prompt for confirmation.
Store the Install-WindowsUpdate.ps1 script on your local machine (example: c:\temp\Install-WindowsUpdate.ps1) before uploading the script to the Storage Container.
Step 3. Store Install-WindowsUpdate.ps1 in Azure Blob storage
We first need to create an Azure Blob Storage Container to store the Install-WindowsUpdate.ps1 script.
Use the following script to create a new Storage Account with a Blob Container.
#region variables $Location = 'westeurope' $ResourceGroupName = 'scriptextensiondemo-rg' $StorageAccountName = 'scriptextensiondemosa' $ContainerName = 'script' $FileName = 'Install-WindowsUpdate.ps1' $ScriptToUpload = 'c:\temp\{0}' -f $FileName $Tag = @{'Environment'='Demo'} #endregion #Login to Azure Add-AzureRmAccount #Select Azure Subscription $subscription = (Get-AzureRmSubscription | Out-GridView ` -Title 'Select an Azure Subscription ...' ` -PassThru) Set-AzureRmContext -SubscriptionId $subscription.Id -TenantId $subscription.TenantID Select-AzureRmSubscription -SubscriptionName $($subscription.Name) #endregion #region Create new Resource Group New-AzureRmResourceGroup -Name $ResourceGroupName -Location $Location -Tag $Tag #endregion #region Create a new storage account. New-AzureRmStorageAccount -Name $StorageAccountName -ResourceGroupName $ResourceGroupName -SkuName Standard_LRS -Location $Location -Kind BlobStorage -AccessTier Cool -Tag $Tag #endregion #region Create a Script Container Set-AzureRmCurrentStorageAccount -Name $StorageAccountName -ResourceGroupName $ResourceGroupName New-AzureStorageContainer -Name $ContainerName -Permission Blob #endregion #region upload script extension script to container Set-AzureStorageBlobContent -Container $ContainerName -File $ScriptToUpload #endregion
Step 4. Create an Azure Runbook that updates the Custom Script Extension on a scheduled interval
The final step in this scenario is to create an Azure Runbook which updates the Custom Script Extension.
To update (re-run) an already configured Custom Script Extension we need to use the ForceRerun parameter of the Set-AzureRmVMCustomScriptExtension cmdlet.
Example:
#region rerun script extension Set-AzureRmVMCustomScriptExtension -ResourceGroupName $ResourceGroupName ` -VMName $VMName ` -StorageAccountName $StorageAcccountName ` -ContainerName $ContainerName ` -FileName $FileName ` -Run $FileName ` -Name $ScriptExtensionName ` -Location $Location ` -ForceRerun $(New-Guid).Guid #endregion
Although the Set-AzureRmVMCustomScriptExtension cmdlet can configure and rerun Custom Script extensions it has one small drawback and that is that it is blocking the call until it finishes the script on the Azure VM. For scripts that don't take a while to finish this is not a problem but for the Windows Update installation Get-WUInstall cmdlet this can take quite some time to finish.
That's why I choose to use the Azure REST API directly instead of using the Set-AzureRmVMCustomScriptExtension cmdlet in the Azure Automation Runbook. This will save us Runbook running costs.
Change the Install-WindowsUpdate.ps1 to the following version:
try { #Verify if PowerShellGet module is installed. If not install if (!(Get-Module -Name PowerShellGet)) { Invoke-WebRequest 'http://ift.tt/2veBzpU' -OutFile $($env:temp +'\PackageManagement_x64.msi') Start-Process $($env:temp +'\PackageManagement_x64.msi') -ArgumentList "/qn" -Wait } #Verify if PSWindowsUpdate PowerShell Module is installed. If not install. if (!(Get-Module -Name PSWindowsUpdate -List)){ Install-Module -Name PSWindowsUpdate -Scope AllUsers -Confirm:$false -Force } Get-WUInstall -WindowsUpdate -AcceptAll -AutoReboot -Confirm:$FALSE -ErrorAction stop } catch { Write-Output "Oops. Something failed" }
Now we can create a new Azure Automation Runbook. Check the Azure Automation documentation for getting started with Azure Automation.
Remark:
If you are using the Set-AzureRmVMCustomScriptExtension cmdlet in your Runbook make sure you have installed the latest AzureRM.Compute PowerShell module in Azure Automation, because this Runbook needs the Set-AzureRmVMCustomScriptExtension cmdlet with the ForceReRun parameter! You can update the AzureRM PowerShell modules in your Azure Automation Account using the Update Azure Modules button.
You can now create a new WindowsUpdatePS Runbook with the following code in your Azure Automation Account.
This Runbook shows the usage of the Set-AzureRmVMCustomScriptExtension cmdlet which has the drawback that it is blocking the call until it finishes the script on the Azure VM. And that's why you see the timeout message error for the Runbook.
# --------------------------------------------------- # Script: WindowsUpdatePS.ps1 # Tags: Blog, WindowsUpdate # Runbook name: WindowsUpdatePS # Version: 0.1 # Author: Stefan Stranger # Date: 21-07-2017 11:28:52 # Description: This runbooks triggers Windows Update using WindowsUpdate PowerShell Module. # Comments: # Changes: # Disclaimer: # This example is provided "AS IS" with no warranty expressed or implied. Run at your own risk. # **Always test in your lab first** Do this at your own risk!! # The author will not be held responsible for any damage you incur when making these changes! # --------------------------------------------------- $VerbosePreference = 'Continue' #remove when publishing runbook #region variables $Location = 'westeurope' $ResourceGroupName = 'scriptextensiondemo-rg' $StorageAcccountName = 'scriptextensiondemosa' $ContainerName = 'script' $FileName = 'Install-WindowsUpdate.ps1' $ScriptToUpload = 'c:\temp\{0}' -f $FileName $Tag = @{'Environment'='Demo'} $VMName = 'scriptdemovm-01' $ScriptExtensionName = 'WindowsUpdate' #endregion #region Connection to Azure write-verbose "Connecting to Azure" $connectionName = "AzureRunAsConnection" try { # Get the connection "AzureRunAsConnection " $servicePrincipalConnection = Get-AutomationConnection -Name $connectionName "Logging in to Azure..." Add-AzureRmAccount ` -ServicePrincipal ` -TenantId $servicePrincipalConnection.TenantId ` -ApplicationId $servicePrincipalConnection.ApplicationId ` -CertificateThumbprint $servicePrincipalConnection.CertificateThumbprint } catch { if (!$servicePrincipalConnection) { $ErrorMessage = "Connection $connectionName not found." throw $ErrorMessage } else{ Write-Error -Message $_.Exception.Message throw $_.Exception } } #endregion #region update Windows Update Custom Script Extension try { Write-Verbose 'Updating Custom Script Extension' Set-AzureRmVMCustomScriptExtension -ResourceGroupName $ResourceGroupName ` -VMName $VMName ` -StorageAccountName $StorageAcccountName ` -ContainerName $ContainerName ` -FileName $FileName ` -Run $FileName ` -Name $ScriptExtensionName ` -Location $Location ` -ForceRerun $(New-Guid).Guid } Catch { Write-Error -Message $_.Exception.Message throw $_.Exception } #endregion
To avoid the time out message we can change the Runbook to use the Azure ARM REST API directly.
For more information about using the Azure ARM REST API check the following blog posts:
Using the Azure ARM REST API – Get Access Token
Using the Azure ARM REST API – Get Subscription Information
Using the Azure ARM REST API – End to end Example Part 1
Using the Azure ARM REST API – End to end Example Part 2
The following Runbook uses the Azure ARM REST API directly to configure and update the Custom Script Extension of an Azure VM.
# --------------------------------------------------- # Script: WindowsUpdatePS.ps1 # Tags: Blog, WindowsUpdate # Runbook name: WindowsUpdatePS # Version: 0.2 # Author: Stefan Stranger # Date: 30-07-2017 11:28:52 # Description: This runbook triggers Windows Update using WindowsUpdate PowerShell Module using the Azure REST API. # The ARM REST API is being used due to fact that the Set-AzureRmVMCustomScriptExtension cmd blocks the call until # the Custom Script Extension is being executed. Which can take quite some time to finish. # Comments: Make sure the Script is available via anonymous access. # Changes: # Disclaimer: # This example is provided "AS IS" with no warranty expressed or implied. Run at your own risk. # **Always test in your lab first** Do this at your own risk!! # The author will not be held responsible for any damage you incur when making these changes! # --------------------------------------------------- [CmdletBinding()] [OutputType([string])] Param ( # VM Name [Parameter(Mandatory = $true, ValueFromPipelineByPropertyName = $true, Position = 0)] $VMName ) $VerbosePreference = 'Continue' #remove when publishing runbook #region Runbook variables Write-Verbose -Message 'Retrieving hardcoded Runbook Variables' $Resourcegroupname = 'scriptextensiondemo-rg' $ExtensionName = 'WindowsUpdate' $APIVersion = '2017-03-30' $ScriptExtensionUrl = 'https://[enteryourvaluehere].blob.core.windows.net/script/Install-WindowsUpdate.ps1' #endregion #region Connection to Azure Write-Verbose -Message 'Connecting to Azure' $connectionName = 'AzureRunAsConnection' try { # Get the connection "AzureRunAsConnection " $servicePrincipalConnection = Get-AutomationConnection -Name $connectionName 'Logging in to Azure...' Add-AzureRmAccount ` -ServicePrincipal ` -TenantId $servicePrincipalConnection.TenantId ` -ApplicationId $servicePrincipalConnection.ApplicationId ` -CertificateThumbprint $servicePrincipalConnection.CertificateThumbprint } catch { if (!$servicePrincipalConnection) { $ErrorMessage = "Connection $connectionName not found." throw $ErrorMessage } else { Write-Error -Message $_.Exception.Message throw $_.Exception } } #endregion #region Get AccessToken Write-Verbose 'Get Access Token' $currentAzureContext = Get-AzureRmContext $azureRmProfile = [Microsoft.Azure.Commands.Common.Authentication.Abstractions.AzureRmProfileProvider]::Instance.Profile $profileClient = New-Object -TypeName Microsoft.Azure.Commands.ResourceManager.Common.RMProfileClient -ArgumentList ($azureRmProfile) $token = $profileClient.AcquireAccessToken($currentAzureContext.Subscription.TenantId) #endregion #region Get extension info Write-Verbose -Message 'Get extension info' $Uri = 'http://ift.tt/2veD6w4}' -f $($currentAzureContext.Subscription), $Resourcegroupname, $VMName, $ExtensionName, $APIVersion $params = @{ ContentType = 'application/x-www-form-urlencoded' Headers = @{ 'authorization' = "Bearer $($token.AccessToken)" } Method = 'Get' URI = $Uri } $ExtensionInfo = Invoke-RestMethod @params -ErrorAction SilentlyContinue if (!($ExtensionInfo)) { Write-Verbose 'No Custom Script Extension Configured. Please do an initial script configuration first' #region configure custom script extension $Uri = 'http://ift.tt/2veD6w4}' -f $($currentAzureContext.Subscription), $Resourcegroupname, $VMName, $ExtensionName, '2017-03-30' $body = @" { "location": "westeurope", "properties": { "publisher": "Microsoft.Compute", "type": "CustomScriptExtension", "typeHandlerVersion": "1.4", "autoUpgradeMinorVersion": true, "forceUpdateTag": "InitialConfig", "settings": { "fileUris" : ["$ScriptExtensionUrl"], "commandToExecute": "powershell -ExecutionPolicy Unrestricted -file Install-WindowsUpdate.ps1" } } } "@ $params = @{ ContentType = 'application/json' Headers = @{ 'authorization' = "Bearer $($token.AccessToken)" } Method = 'PUT' URI = $Uri Body = $body } $InitialConfig = Invoke-RestMethod @params $InitialConfig exit #endregion } #endregion #region Get Extension message info Write-Verbose 'Get Extension message info' $Uri = 'http://ift.tt/2tQAOzP}' -f $($currentAzureContext.Subscription), $Resourcegroupname, $VMName, $ExtensionName, $APIVersion $params = @{ ContentType = 'application/x-www-form-urlencoded' Headers = @{ 'authorization' = "Bearer $($token.AccessToken)" } Method = 'Get' URI = $Uri } $StatusInfo = Invoke-RestMethod @params #$StatusInfo [regex]::Replace($($StatusInfo.properties.instanceView.SubStatuses[0].Message), '\\n', "`n") #endregion #region Update Script Extension try { Write-Verbose 'Update Script Extension' $Uri = 'http://ift.tt/2veD6w4}' -f $($currentAzureContext.Subscription), $Resourcegroupname, $VMName, $ExtensionName, '2017-03-30' $body = @" { "location": "westeurope", "properties": { "publisher": "Microsoft.Compute", "type": "CustomScriptExtension", "typeHandlerVersion": "1.4", "autoUpgradeMinorVersion": true, "forceUpdateTag": "$(New-Guid)", "settings": { "fileUris" : ["$ScriptExtensionUrl"], "commandToExecute": "powershell -ExecutionPolicy Unrestricted -file Install-WindowsUpdate.ps1" } } } "@ $params = @{ ContentType = 'application/json' Headers = @{ 'authorization' = "Bearer $($token.AccessToken)" } Method = 'PUT' URI = $Uri Body = $body } $Updating = Invoke-RestMethod @params $Updating } catch { Write-Error -Message $_.Exception.Message throw $_.Exception } #endregion
When you test the Runbook from the AzureAutomationAuthoringToolkit PowerShell Module you will see the following output.
The initial Get Extension Info retrieve fails due to the fact that there is no Custom Script Extension configured yet for the VM.
You can verify if the Custom Script Extension is configured via the Azure Portal.
Now we just have to wait for the Custom Script Extension PowerShell Script to finish. This can take quite some time if a larger number of Windows Updates have to be installed on the VM.
You can retrieve the status of the Custom Script Extension with the following PowerShell commands:
Get-AzureRmVMDiagnosticsExtension -ResourceGroupName $ResourceGroupName -VMName $VMName -Name $ScriptExtensionName -Status
Is our case you can see the script is still running on the VM.
When the Custom Script Extension is finished you see something like this.
With the following code you can prettify the output.
#region get script extension status $output = Get-AzureRmVMDiagnosticsExtension -ResourceGroupName $ResourceGroupName -VMName $VMName -Name $ScriptExtensionName -Status #-Debug $text = $output.SubStatuses[0].Message [regex]::Replace($text, "\\n", "`n") #endregion
Or you can go to the portal and check the status for the extension.
A final check to see if all the Windows Updates have been installed can be executed but verifying with the Get-WUHistory cmdlet on the VM itself which Windows Updates have been installed.
You can now schedule the Runbook to have Windows Updates regularly been run on the Azure VM.
References:
Custom Script Extension for Windows
Remoting into Azure ARM Virtual Machines - Configuration and Management
DSC Script Resource
PSWindowsUpdate PowerShell Module
Using Azure PowerShell with Azure Storage
Azure Automation Documentation
Using the Azure ARM REST API – Get Access Token
Using the Azure ARM REST API – Get Subscription Information
Using the Azure ARM REST API – End to end Example Part 1
Using the Azure ARM REST API – End to end Example Part 2
PowerShell Azure Automation Authoring Toolkit
from Stefan Stranger's Weblog – Manage your IT Infrastructure http://ift.tt/2tQlN12 via IFTTT
0 notes
Text
Windows 10 and 11 have a GPO to not reboot after installing updates while a user is logged in.
Unfortunately, apparently Microsoft deems some updates as “THIS MUST BE INSTALLED IMMEDIATELY” so while it did cut down on autoreboots significantly, it’s not a bulletproof setting and I still lost stuff from time to time.
I have configured it to not even download now, just alert.
0 notes