Skip to main content

Posts

Apply Azure monitoring metrics using PowerShell

Azure Monitor - Apply Azure monitoring metrics using PowerShell  #Creating an action group as an object $action = [Microsoft.Azure.Management.Monitor.Management.Models.ActivityLogAlertActionGroup]::New("/subscriptions/SubscriptionIDUpdatehere/resourceGroups/alert/providers/Microsoft.Insights/actiongroups/alertaction") #Setting up condition as an object $condition1 = New-AzMetricAlertRuleV2Criteria `  -MetricName "Percentage CPU" `  -MetricNameSpace "Microsoft.Compute/virtualMachines" `  -TimeAggregation Average `  -Operator GreaterThan `  -Threshold 96 $condition2 = New-AzMetricAlertRuleV2Criteria `  -MetricName "Available Memory Bytes" `  -MetricNameSpace "Microsoft.Compute/virtualMachines" `  -TimeAggregation Average `  -Operator LessThan `  -Threshold 1000000000 $condition3 = New-AzMetricAlertRuleV2Criteria `  -MetricName "Data Disk IOPS Consumed Percentage" `  -MetricNameSpace "Microsoft.Compute/virtualMachines" ...
Recent posts

How to get installed updates.

Using PowerShell: Open a PowerShell prompt with Admin permissions. Type Get-Hotfix and press Enter or wmic qfe | findstr "" Using a command line: Open a command prompt with Admin permissions. Type systeminfo.exe and press Enter. Scroll down to check installed host fixes. Using the Windows Update Settings User Interface: Open the Windows Settings UI. Click on Update & security. Click on the " Update history " link located under the Windows Update tab.

PowerShell Script for the Services

PS > Get-Service PS> Get-WmiObject win32_service | select Name, DisplayName, State, PathName | Out-GridView PS> Get-WmiObject win32_service | select Name, DisplayName, State, PathName | Export-Csv -path "C:\services.csv" PS> Get-Service | Where Status -eq "Running" | Out-GridView PS> Get-Service -ComputerName RemoteComputerName | Where Status -eq "Stopped" | Out-GridView PS> Get-Service -Displayname "*plug*"

PowerShell Commands

Get-Host The Get-Host cmdlet gets an object that represents the program that is hosting Windows PowerShell. The default display includes the Windows PowerShell version number and the current region and language settings that the host is using, but the host object contains a wealth of information, including detailed information about the version of Windows PowerShell that is currently running and the current culture and UI culture of Windows PowerShell. You can also use this cmdlet to customize features of the host program user interface, such as the text and background colors. Out-Host Sends output to the command line. The Out-Host cmdlet sends output to the Windows PowerShell host for display. The host displays the output at the command line. Because Out-Host is the default, you do not have to specify it unless you want to use its parameters to change the display. Get-Process | Out-Host -Paging Clear-Host The Clear-Host function removes all text from the current displ...

Useful Open Manage Server Administrator(omreport) commands for Dell server

The Open Manage command line interface allows you to check the state of your hardware and do hardware settings. Below commands are quick reference for Dell server, you can always use "omhelp omreport" commands to show help manual of "omreport". 1. System component properties. System logs omreport system alertlog  --View alert log. omreport system esmlog    --View hardware (Embedded System Management) log. omreport system cmdlog    --View command log. OS omreport system operatingsystem Summary of all system components(Including major components versions) omreport system summary Version report for all updateable components. (Including BIOS,OS and controller versions) omreport system version 2. Chassis component properties. Power (Check power peak stats and threshold) omreport chassis pwrmonitoring Check power capacity omreport chassis pwrmanagement Power health status omreport chassi...

Microsoft-Windows-User Profiles Service / Id: 1511

Windows cannot find the local profile and is logging you on with a temporary profile. Changes you make to this profile will be lost when you log off. Cause: This event can be caused by the following issues:   Your local profile is corrupt. You no longer have adequate privileges to the profile folders. User profile was deleted manually or by other means. A profile that is manually deleted does not remove the Security Identifier (SID) from the profile list in the registry. If the SID is present, Windows will try to load the profile by using the ProfileImagePath that points to a nonexistent path. Therefore, the profile cannot be loaded. Occasionally, Windows might not read your user profile correctly, for example, if your antivirus software is scanning your computer while you try to log on. Resolutions 1) Sign out and restart the computer Try restarting your computer and signing on with your user account again to resolve the issue. 2) Delete the error SID and ...

Volume Shadow Copy Service - VSS

Volume Shadow Copy: A Volume Shadow Copy Service-based backup (VSS-based backup) is a Windows service that captures and creates snapshots called shadow copies. VSS, also known as Volume Snapshot Service, operates at the block level of the file system and enables virtual server backup in Microsoft environments. VSS has three components: Requestor—The application that requests the creation of a shadow copy. Provider—The interface that provides the functionality to actually make the shadow copy. Writer—Application-specific software that acts to ensure that application data is ready for shadow copy creation. Requestors, providers, and writers communicate in the VSS framework to create and restore volume shadow copies. A shadow copy of a volume duplicates all the data held on that volume at one well-defined instant in time. A requestor initiates the backup and restore processes. The provider controls the processes and instructs a writer to prepare a dataset for backup. Wh...