fbpx Windows | HostingUltraso.com
24/7/365 Support

Windows

Manage Alerts

Problem

You want to retrieve and manage alerts in the current monitoring object.

Solution

To retrieve alerts on the current monitoring object, use the GetAlert cmdlet. To retrieve only active alerts, apply a filter to include only those with a ResolutionState of 0.

>GetAlert | WhereObject { $_.ResolutionState eq 0 } | SelectObject Description

Description

List and Start Tasks

Problem

You want to list all the tasks allowed in a monitoring object, and then invoke one.

Solution

To retrieve cmdlets allowed for the current monitoring object, use the GetTask cmdlet:

$task = GetTask | WhereObject { $_.DisplayName –match "TaskName" }

Then use the StartTask cmdlet to start the task: $task | StartTask

Discussion

Enable or Disable Rules

Problem

You want to enable or disable rules not sealed in a management pack.

Solution

To retrieve a rule, use the GetRule: $rule = GetRule | WhereObject { $_.DisplayName –match "RuleName" }

Then, use the EnableRule or DisableRule cmdlet to enable or disable that rule, respectively:

$rule | EnableRule

$rule | DisableRule

Discussion

Get, Install, and Uninstall Management Packs

Problem

You want to automate the deployment or configuration of management packs.

Solution

To retrieve information about installed management packs, use the GetManagementPack cmdlet, as shown in Example 261.

Example 261. Using the GetManagementPack cmdlet

PS Monitoring:\Oxford.contoso.com >$mp = GetManagementPack | WhereObject { $_.DisplayName eq "Health Internal Library" } PS Monitoring:\Oxford.contoso.com >$mp

Schedule a Maintenance Window

Problem

You want to place a server in maintenance mode to prevent it from generating incorrect alerts.

Solution

To schedule a maintenance window on a computer, use the NewMaintenanceWindow cmdlet:

$computer = GetAgent | WhereObject { $_.Name match "Denver" }

$computer.HostComputer | NewMaintenanceWindow `

StartTime (GetDate) `

EndTime (GetDate).AddMinutes(5) `

Comment "Security updates"

To retrieve information about that maintenance window, use the GetMaintenanceWindow cmdlet:

Manage Operations Manager Agents

Problem

You want to manage Operations Manager agents on remote machines.

Solution

To retrieve information about installed agents, use the GetAgent cmdlet:

PS Monitoring:\Oxford.contoso.com >GetAgent | SelectObject DisplayName

DisplayName

Ibiza.contoso.com Denver.contoso.com Sydney.contoso.com

To remove an agent, use the UninstallAgent cmdlet:

PS Monitoring:\Oxford.contoso.com >GetAgent | WhereObject { $_.DisplayName match "Denver" } | >> UninstallAgent

Manage Outlook Web Access

Problem

You want to get and modify Outlook Web Access settings from the Exchange Management Shell.

Solution

To retrieve information about an Outlook Web Access virtual directory, use the GetOwaVirtualDirectory cmdlet:

$owa = GetOwaVirtualDirectory "owa (Default Web Site)"

To modify information about that virtual directory, use the SetOwaVirtualDirectory cmdlet. This example prevents users from changing their passwords through Outlook Web Access:

$owa | SetOwaVirtualDirectory –ChangePasswordEnabled:$false

Discussion

Manage Transport Rules

Problem

You want to manage transport rules applied to incoming or outgoing mail.

Solution

To create transport rules on the server, use the NewTransportRule cmdlet, as shown in Example 251.

Example 251. Creating a new transport rule

$from = GetTransportRulePredicate FromScope $from.Scope = "NotInOrganization"

$attachmentSize = GetTransportRulePredicate AttachmentSizeOver $attachmentSize.Size = 0

Manage Distribution Groups

Problem

You want to get and modify information about distribution groups from the Exchange Management Shell.

Solution

To retrieve information about a distribution group, or distribution groups, use the GetDistributionGroup cmdlet:

$group = GetDistributionGroup "Stock Traders"

$group | FormatList *

To modify information about a group, use the SetDistributionGroup cmdlet. This example updates the Stock Traders distribution group to accept messages only from other members of the Stock Traders distribution group:

Pages

Get Windows Dedicated Server

Only reading will not help you, you have to practice it! So get it now.

Processor RAM Storage Server Detail
Intel Atom C2350 1.7 GHz 2c/2t 4 GB DDR3 1× 1 TB (HDD SATA) Configure Server
Intel Atom C2350 1.7 GHz 2c/2t 4 GB DDR3 1× 128 GB (SSD SATA) Configure Server
Intel Atom C2750 2.4 GHz 8c/8t 8 GB DDR3 1× 1 TB (HDD SATA) Configure Server
Intel Xeon E3-1230 v2 3.3 GHz 4c/8t 16 GB DDR3 1× 256 GB (SSD SATA) Configure Server
Intel Atom C2350 1.7 GHz 2c/2t 4 GB DDR3 1× 250 GB (SSD SATA) Configure Server

What Our Clients Say