Skip to content

Instantly share code, notes, and snippets.

Avatar
🌱
Learning && Growing

Deepak Singh Dhami DexterPOSH

🌱
Learning && Growing
View GitHub Profile
View SCCM 2012 Client Logs.txt
AppDiscovery.log Detects installed Application Deployment Types and if deployed Deployment Types are not installed, this log file will show you why (only for the new style ConfigMgr Applications)
AppEnforce.log will show you the actual command-line executed and the resulting exit code for each Deployment Type (only for the new style ConfigMgr Applications)
AppIntentEval.log evaluates each Deployment Type’s dependencies and policies (only for the new style ConfigMgr Applications)
AssetAdvisor.log inventories all installed software (not 100% sure)
CAS.log Content access service, discovers DPs, download sources and maintains local cache
CCM32BitLauncher.log logs all command-lines for executed packages (old style ConfigMgr)
@DexterPOSH
DexterPOSH / Set_VM_size.ps1
Last active Aug 29, 2015
This Script is used for setting the VM Size (SCCM 2012 Application)
View Set_VM_size.ps1
#region get Script Directory
function Get-ScriptDirectory
{
$Invocation = (Get-Variable MyInvocation -Scope 1).Value
Split-Path $Invocation.MyCommand.Path
}
$scriptdir = Get-ScriptDirectory
#endregion
@DexterPOSH
DexterPOSH / Unset_VM_size.ps1
Last active Aug 29, 2015
Lets the System manage the Page File
View Unset_VM_size.ps1
#region get Script directory
function Get-ScriptDirectory
{
$Invocation = (Get-Variable MyInvocation -Scope 1).Value
Split-Path $Invocation.MyCommand.Path
}
$scriptdir = Get-ScriptDirectory
#endregion
View Get-IPAddress.ps1
Function Get-IPAddressBoundary
{
<#
.Synopsis
Gets which Boundary an IP Address belongs to.
.DESCRIPTION
The Function will iterate over the boundaries and get which particular Boundary that falls in.
.EXAMPLE
Get-IPAddressBoundary -SiteServer dexsccm -IPAddress 10.1.1.110
View Draft_Add_Setting_CI.ps1
#Load the ConfigurationManager Module
Import-Module -Name "$(split-path $Env:SMS_ADMIN_UI_PATH)\ConfigurationManager.psd1"
#Change location to my CMSite Provider
Cd DEX:
#Load the Default Parameter Values for Get-WMIObject cmdlet
$PSDefaultParameterValues =@{"get-wmiobject:namespace"="Root\SMS\site_DEX";"get-WMIObject:computername"="DexSCCM"}
View Get-OfflinePrinter.ps1
function Get-OffilnePrinter
{
[CmdletBinding()]
[OutputType([int])]
Param
(
# Param1 help description
[Parameter(Mandatory=$true,
ValueFromPipeline=$true,
ValueFromPipelineByPropertyName=$true,
View AzureNotes.ps1
# Get the Settings file
Get-AzurePublishSettingsFile
#Import the file
Import-AzurePublishSettingsFile -PublishSettingsFile "C:\Temp\Visual Studio Ultimate with MSDN-7-19-2014-credentials.publishsettings"
#Remove the Settings once imported
Remove-item "C:\Temp\Visual Studio Ultimate with MSDN-7-19-2014-credentials.publishsettings"
View Get-PrinterInfo.ps1
Set-StrictMode -Version latest
function Get-PrinterInfo
{
[CmdletBinding()]
[OutputType([int])]
Param
(
# Specify the ComputerName
[Parameter(Mandatory=$true,
ValueFromPipelineByPropertyName=$true,
View New-TestVM.ps1
workflow New-TestVM
{
param(
[parameter(Mandatory)]
[String]
$AzureSubscriptionName,
[parameter(Mandatory)]
[String]
$ServiceName,
View highlightword.ps1
$objWord = New-Object -ComObject word.application
$objWord.Visible = $True
$objDoc = $objWord.Documents.Open("C:\temp\test.docx")
$FindText = "document"
foreach ($docrange in $objDoc.Words)
{
if ($docrange.Text.Trim() -eq $FindText)