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 | |
SET JRE_RUNNING= | |
SET PROBLEM= | |
SET INST_FILE=%~n1 | |
SET LOG_DIR=%windir%\system32\LogFiles | |
SET CMD_OPTS= /s REBOOT=ReallySuppress /L*v "%LOG_DIR%\%INST_FILE%_inst.log" | |
ECHO. | |
ECHO Check for installer requirements... | |
ECHO. |
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
SELECT | |
[conn2].[Name] | |
, [conn1].[TotalCount] | |
, [conn1].[LicenseInUseCount] | |
, [PercentageUsed] = ( | |
CASE | |
WHEN [conn1].[LicenseInUseCount] > 0 THEN ROUND(((CAST ([conn1].[LicenseInUseCount] AS FLOAT) / 100.0) / (CAST( [conn1].[TotalCount] AS FLOAT ) / 100.0)) * 100, 2) | |
ELSE 0 | |
END | |
) |
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
<!-- Example Deployment Rule Set that allow a desktop administrator to control end-user's execution of browser applets. | |
See http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/security/deployment_rules.html --> | |
<ruleset version="1.0+"> | |
<rule> | |
<id location="http://payroll.example.org" /> | |
<action permission="run" /> | |
</rule> | |
<rule> | |
<id location="http://knownvendor.example.com/program" /> | |
<!-- For example if an application is known not to work on Java 1.7 --> |
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
<# | |
.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
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
[string]::Join("`r`n",(Get-Content -Path "File.sql") -replace ([regex]::Escape("{00000000-0000-0000-0000-000000000000}"), $Some.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
DECLARE @T TABLE | |
( | |
-- sp_who2 utilizes sys.sysprocesses (loosely) | |
--http://technet.microsoft.com/en-us/library/ms179881.aspx | |
[spid] SMALLINT, | |
[status] VARCHAR(50), | |
[login] VARCHAR(50), | |
[hostname] VARCHAR(50), | |
[blk] VARCHAR(50), | |
[dbname] VARCHAR(50), |
OlderNewer