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
-- Computers with System Center Operations Manager | |
SELECT [Name] = UPPER([Name]) | |
FROM [vComputer] | |
WHERE [Guid] IN ( | |
SELECT [_ResourceGuid] | |
FROM [Inv_AeX_AC_NT_Services] | |
WHERE [Name] = 'HealthService' | |
) | |
ORDER BY [Name] |
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
[CmdletBinding(SupportsShouldProcess=$True)] | |
param ( | |
#SMTP server name | |
[string]$smtpServer = "smtp", | |
[string]$From, | |
#[string]$ReplyTo = "", | |
[string]$To, | |
[string]$Cc, | |
[string]$Subject = "Automation Policies Email Verification", | |
[switch]$Export |
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
#deployment.properties | |
# Security Tab | |
# Enable Java content in the browser | |
deployment.webjava.enabled=true | |
deployment.webjava.enabled.locked | |
# Security Level | |
deployment.security.level=MEDIUM | |
deployment.security.level.locked |
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
<# | |
.SYNOPSIS | |
Add and remove Java Control Panel applet entries in the Windows Control Panel. | |
.DESCRIPTION | |
The JavaCPL function collects control panel applet information from the registry. It uses this information to analyze currently visible entries and their status. Based on this information entries can be removed, added or modified. | |
.PARAMETER Add | |
Add available Java Control Panel applets to the Windows Control Panel. Existing Java Control Panel applets will not be affected. | |
.PARAMETER Remove | |
Remove Java Control Panel applets that are not installed from the Windows Control Panel. Available Java Control Panel applets will remain. | |
.PARAMETER All |
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
@ECHO OFF | |
:: Get the Install Path from the registry | |
FOR /F "tokens=3*" %%A IN ('REG.EXE QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Altiris\Altiris Agent\Plugin Objects\Agents\InvAgent" /V "Install Path" ^| FINDSTR /i /c:"Install Path"') DO SET InstallPath=%%B | |
IF NOT DEFINED InstallDir ( | |
FOR /F "tokens=3*" %%A IN ('REG.EXE QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432NODE\Altiris\Altiris Agent\Plugin Objects\Agents\InvAgent" /V "Install Path" ^| FINDSTR /i /c:"Install Path"') DO SET InstallPath=%%B | |
) | |
IF NOT DEFINED InstallDir GOTO:EOF | |
IF DEFINED InstallDir ECHO InstallPath: %InstallPath% |
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
(New-Object System.Security.Principal.NTAccount($env:USERNAME)).Translate([System.Security.Principal.SecurityIdentifier]).Value |
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
Get-ItemProperty -Path "Registry::HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$((New-Object System.Security.Principal.NTAccount($env:USERNAME)).Translate([System.Security.Principal.SecurityIdentifier]).Value).bak" -Name "ProfileImagePath" | Select -ExpandProperty ProfileImagePath | % {$ProfileImagePath = "$($_)" ; Write-Host "ProfileImagePath: $($ProfileImagePath) - " -NoNewline ; if ((Test-Path $ProfileImagePath) -eq $true) {Write-Host "Profile image path found." -ForegroundColor Green} else {Write-Host "Profile image path does not exist." -ForegroundColor Red ; Remove-Item -Path "Registry::HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$((New-Object System.Security.Principal.NTAccount($env:USERNAME)).Translate([System.Security.Principal.SecurityIdentifier]).Value).bak" -Confirm}} |
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
Get-CimInstance -ClassName Win32_QuickFixEngineering | Where-Object { $_.InstalledOn -ge "1/26/2014 12:00:00 AM"} | Select InstalledOn,HotFixID | fl * |
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
logparser "SELECT * FROM 'D:\LogFiles\W3SVC1\u_ex140121.log' WHERE [cs-uri-stem] LIKE '%PostEvent.aspx'" -o:DataGrid |
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 Test-AdministratorContext { | |
[CmdletBinding()]param() | |
$CurrentWindowsIdentity = [System.Security.Principal.WindowsIdentity]::GetCurrent() | |
$CurrentWindowsPrincipal = New-Object System.Security.Principal.WindowsPrincipal($CurrentWindowsIdentity) | |
$IsAdministratorContext = $CurrentWindowsPrincipal.IsInRole([System.Security.Principal.WindowsBuiltInRole]::Administrator) | |
Write-Verbose "Current Context Is Administrator = $IsAdministratorContext" | |
return $IsAdministratorContext | |
} |