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
#Set the Following Parameters | |
#To be run locally on ConfigMgr Source Server | |
$Source = 'E:\Source' | |
$ShareName = 'source$' | |
$NetworkAccount = 'contoso\SCCMAdmins' | |
#Create Source Directory | |
New-Item -ItemType Directory -Path "$Source" | |
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
#requires -version 2 | |
<# | |
.SYNOPSIS | |
Creates dart shortcuts in SCCM Share | |
.DESCRIPTION | |
Creates dart shortcuts in SCCM Share | |
.PARAMETER <Parameter_Name> | |
None | |
.INPUTS | |
None |
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
$result = @() | |
$time = 1 | |
$searchbase = 'OU=WORKSTATIONS,DC=COMPANY,DC=com' | |
$list = (Get-ADComputer -SearchBase $searchbase -Filter 'Enabled -eq $true').name | |
function Get-ComputerSite($i) | |
{ | |
$site = nltest /server:$i /dsgetsite 2>$null | |
if($LASTEXITCODE -eq 0){ $site[0] } | |
} |
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 | |
m.[Name] AS [Computer Name] | |
,m.[LatestProcessingAttempt] | |
,m.[LastErrorCode] | |
,m.[Description] | |
, AD.AD_Site_Name0 AS [AD Site Name] | |
,m.[NumProcessAttempts] | |
FROM v_R_System AD | |
JOIN [CM_XXX].[dbo].[v_CP_Machine] m |
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
<# | |
.NOTES | |
=========================================================================== | |
Created by: Dan Padgett (C) | |
Organization: www.execmgr.net | |
Filename: LoopIE | |
Version: 3.0 | |
=========================================================================== | |
.SYNOPSIS |
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
<job id="StartMBAMEncryption"> | |
<script language="VBScript" src="ZTIUtility.vbs"/> | |
<script language="VBScript"> | |
' // *************************************************************************** | |
' // | |
' // Copyright (c) Microsoft Corporation. All rights reserved. | |
' // | |
' // Microsoft Deployment Toolkit Solution Accelerator | |
' // |
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
$collectionname = Read-Host -Prompt "Enter collection name" | |
$result = @() | |
$Data = Get-CMDeployment | ?{$_.collectionname -like "$collectionname"} | select collectionname, NumberErrors,NumberInProgress,NumberOther,NumberSuccess,NumberTargeted,NumberUnknown | |
foreach($entry in $Data){ | |
$resData = New-Object System.Object | |
$resData | Add-Member -type NoteProperty -name Errors -value ($entry.numbererrors) | |
$resData | Add-Member -type NoteProperty -name InProgress -value ($entry.numberinprogress) |
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
$result = @() | |
$time = 1 | |
$list = (Get-Content C:\Script\List.txt) | |
function get-LoggedInusers($i) | |
{ | |
$Username = $null | |
$explorerprocesses = @(Get-WmiObject -ComputerName $i -Query "Select * FROM Win32_Process WHERE Name='explorer.exe'" -ErrorAction SilentlyContinue) | |
if ($explorerprocesses.Count -eq 0) | |
{ |
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 | |
Sets SCCM Site Code. | |
.DESCRIPTION | |
Checks for the SCCM site code against $DesiredSiteCode , if no match it will reassign the client, remove hardcoded registry values, and log results. | |
.NOTES | |
Version: 1.0 | |
Author: dpadgett | |
Creation Date: 07/02/17 | |
Purpose/Change: Production |
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
$result = @() | |
$time = 1 | |
$list = Get-Content .\list.txt | |
Foreach ($i in $list) | |
{ | |
$intSize = $intSize + $objFile.Length | |
$resData = New-Object System.Object | |
$resData | Add-Member -type NoteProperty -name ComputerName -value $i |