This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PS C:\> GenerateAzureAutomationSchedules -AutomationAccount $AzureAutomationAccount -Verbose | |
VERBOSE: Found 35 Azure Automation Schedule(s) with same Hour Interval. | |
VERBOSE: Creted Azure Automation Schedule for "Every 1 Hour(s) at minute 0". | |
VERBOSE: Azure Automation Schedule for "Every 1 Hour(s) at minute 2" already exists. | |
VERBOSE: Azure Automation Schedule for "Every 1 Hour(s) at minute 4" already exists. | |
VERBOSE: Azure Automation Schedule for "Every 1 Hour(s) at minute 5" already exists. | |
VERBOSE: Azure Automation Schedule for "Every 1 Hour(s) at minute 6" already exists. | |
VERBOSE: Azure Automation Schedule for "Every 1 Hour(s) at minute 8" already exists. | |
VERBOSE: Azure Automation Schedule for "Every 1 Hour(s) at minute 10" already exists. | |
VERBOSE: Azure Automation Schedule for "Every 1 Hour(s) at minute 12" already exists. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set-PSSessionConfiguration -ShowSecurityDescriptorUI -Name Microsoft.PowerShell -Force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-MSFT2014TechnicalPreview | |
{ | |
[CmdletBinding()] | |
Param( | |
[ValidateScript({Test-Path $_})] | |
[string]$Path=(Get-Location), | |
[Switch]$WithProgress | |
) | |
BEGIN | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Modified version of http://poshcode.org/5474 by @sorlov | |
function DoSomething {} | |
function Check-WindowsPreview | |
{ | |
PARAM( | |
[int]$Sleep=10, | |
[switch]$WaitForIt | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Script to remotely stoping and disabling all SCSM Cube Procesing jobs and SSAS instance | |
$SMDWServer = "" | |
$SSASServer = "" | |
$SSASInstanceName = "MSSQLSERVER" | |
Invoke-Command -ScriptBlock { | |
$smdir = (Get-ItemProperty "HKLM:\Software\Microsoft\System Center\2010\Service Manager\Setup").InstallDirectory | |
Import-Module "$smdir\Microsoft.EnterpriseManagement.Warehouse.Cmdlets.psd1" | |
$DWJobs = Get-SCDWJob | Where-Object {$_.Name -like "Process.*"} | |
Foreach ($DWJob in $SCDWJobs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$Events = Get-EventLog -LogName 'Operations Manager' -EntryType Information | Where-Object {$_.EventID -eq 26328} | |
$Logons = @() | |
Foreach ($Event in $Events) | |
{ | |
If ($Event.ReplacementStrings[0] -notin @($Logons.UserName)) | |
{ | |
$Props = [ordered]@{ | |
UserName = $Event.ReplacementStrings[0] | |
LastLogon = $Event.TimeGenerated |
NewerOlder