This file contains hidden or 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
#https://support.software.dell.com/kb/119400 | |
Import-Module AppAssurePowerShellModule | |
Sc.exe Config AppAssureCore Start= Delayed-Auto | |
Start-Service AppAssureCore | |
Resume-Snapshot –All | |
Resume-Replication -outgoing [hostname of remote core] -all | |
Resume-Replication -incoming [hostname of remote core] -all | |
Resume-Vmexport –All |
This file contains hidden or 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-adusersid{ | |
#http://community.spiceworks.com/how_to/show/2776-powershell-sid-to-user-and-user-to-sid | |
param( | |
[string]$domain, | |
[string]$user | |
) | |
$objUser = New-Object System.Security.Principal.NTAccount("$domain", "$user") | |
$strSID = $objUser.Translate([System.Security.Principal.SecurityIdentifier]) |
This file contains hidden or 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-aduserbysid{ | |
#http://community.spiceworks.com/how_to/show/2776-powershell-sid-to-user-and-user-to-sid | |
param( | |
[string]$domain, | |
[string]$sid | |
) | |
$objSID = New-Object System.Security.Principal.SecurityIdentifier ` |
This file contains hidden or 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
# Load assembly for Microsoft Chart Controls for Microsoft .NET Framework 3.5 | |
Write-Verbose "Loading assemblies" | |
[void][Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | |
[void][Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms.DataVisualization") | |
<# | |
.Synopsis | |
Creates a new chart | |
.DESCRIPTION | |
New-Chart creates a new chart object with an optional default dataset. This object is a System.Windows.Forms.DataVisualization.Charting.ChartArea and can be used with either the other methods in this module, or manually. |
This file contains hidden or 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
Import-Module .\charting.psm1 -Force | |
# Create simple dataset | |
$simpleDataset = @{ | |
"Microsoft" = 800 | |
"Apple" = 250 | |
"Google" = 400 | |
"RIM" = 0 | |
} |
This file contains hidden or 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
#this script is to check for the presence of files | |
#this will populate a variable with the specified format of today's date (see format specifier http://msdn.microsoft.com/en-us/library/8kb3ddd4%28v=vs.110%29.aspx) | |
$yyyy = $(Get-Date -format yyyy) # "2014" | |
$mmmm = $(Get-Date -format MMMM) # "September" | |
$mm = $(Get-Date -format MM) # "09" | |
$dd = $(Get-Date -format dd) # "22" | |
#if today is Friday |
This file contains hidden or 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-adusersid{ | |
#http://community.spiceworks.com/how_to/show/2776-powershell-sid-to-user-and-user-to-sid | |
param( | |
[string]$domain, | |
[string]$user | |
) | |
$objUser = New-Object System.Security.Principal.NTAccount("$domain", "$user") | |
$strSID = $objUser.Translate([System.Security.Principal.SecurityIdentifier]) | |
$strSID.Value |
This file contains hidden or 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
#http://blogs.technet.com/b/heyscriptingguy/archive/2012/02/28/use-powershell-to-configure-static-ip-and-dns-settings.aspx | |
function set-dnsservers { | |
param( | |
[string[]]$dnsservers, | |
[string]$computername | |
) | |
#you must filter by ip address, otherwise it will affect all ipenabled NICs, which will include any iSCSI | |
$wmi = get-wmiobject -ComputerName $computername win32_networkadapterconfiguration -filter "ipenabled='true'" | where {$_.ipaddress -like "192.168.50*" } |
This file contains hidden or 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
$computer = $env:COMPUTERNAME | |
$checkintervalmins = 60 | |
$checkintervalms = (new-timespan -minutes $checkintervalmins).totalmilliseconds | |
#http://www.mcbsys.com/techblog/2011/04/powershell-get-winevent-vs-get-eventlog/ | |
This file contains hidden or 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
################################################################################################################# | |
# | |
# Version 1.1 May 2014 | |
# Robert Pearman (WSSMB MVP) | |
# TitleRequired.com | |
# Script to Automated Email Reminders when Users Passwords due to Expire. | |
# | |
# modified by matt brown | |
# | |
# Requires: Windows PowerShell Module for Active Directory |