Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View DexterPOSH's full-sized avatar
🌱
Learning && Growing

Deepak Singh Dhami DexterPOSH

🌱
Learning && Growing
View GitHub Profile
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 August 29, 2015 13:58
This Script is used for setting the VM Size (SCCM 2012 Application)
#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 August 29, 2015 13:58
Lets the System manage the Page File
#region get Script directory
function Get-ScriptDirectory
{
$Invocation = (Get-Variable MyInvocation -Scope 1).Value
Split-Path $Invocation.MyCommand.Path
}
$scriptdir = Get-ScriptDirectory
#endregion
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
#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"}
function Get-OffilnePrinter
{
[CmdletBinding()]
[OutputType([int])]
Param
(
# Param1 help description
[Parameter(Mandatory=$true,
ValueFromPipeline=$true,
ValueFromPipelineByPropertyName=$true,
# 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"
Set-StrictMode -Version latest
function Get-PrinterInfo
{
[CmdletBinding()]
[OutputType([int])]
Param
(
# Specify the ComputerName
[Parameter(Mandatory=$true,
ValueFromPipelineByPropertyName=$true,
workflow New-TestVM
{
param(
[parameter(Mandatory)]
[String]
$AzureSubscriptionName,
[parameter(Mandatory)]
[String]
$ServiceName,
$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)