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
$smdir = (Get-ItemProperty "HKLM:\Software\Microsoft\System Center\2010\Service Manager\Setup").InstallDirectory | |
Import-Module "$smdir\Microsoft.EnterpriseManagement.Warehouse.Cmdlets.psd1" | |
$SleepTimer = 120 | |
$JobTypes = @( | |
"DWMaintenance", | |
"MPSyncJob", | |
"Extract_", | |
"Transform.", |
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