Skip to content

Instantly share code, notes, and snippets.

View example.hta
'Example 1 - dropdown
'OSD environment objects - referenced in the task sequence to name the computer
<SCRIPT LANGUAGE="VBScript">
SET env = CreateObject("Microsoft.SMS.TSEnvironment")
env("APC") = drop_APC.value
<tr>
<td align="right">Airport Code:</td>
<td><select size="1" name="drop_apc">
<option value="ATL">Atlanta, GA (ATL)</option>
@tstolswo
tstolswo / Royal TS.xml
Created Sep 24, 2019
Royal TS recipe for SCCM Application Packager
View Royal TS.xml
<ApplicationDef>
<Application>
<Name>Royal TS</Name>
<Description>Royal TS provides powerful, easy and secure access to your remote systems. It's the perfect tool for server admins, system engineers, developers and IT focused information workers who constantly need to access remote systems with different protocols (like RDP, VNC, SSH, HTTP/S, and many more.)</Description>
<Publisher>Royal Applications</Publisher>
<AutoInstall>True</AutoInstall>
<UserDocumentation>https://content.royalapplications.com/Help/RoyalTS/V4/index.html?introduction_yourfirstconnection.htm</UserDocumentation>
<Icon>RoyalTS.ico</Icon>
</Application>
<Downloads>
View set-snashostname.ps1
PowerShell -ExecutionPolicy Bypass -Command "(New-Object -COMObject Microsoft.SMS.TSEnvironment).Value('OSDComputerName') = (Get-CimInstance -Class Win32_BIOS).SerialNumber -replace '-' -replace '^(.{15})(.+)','$1'"
View SMSUID=1-2.wql
SELECT sms_r_system.resourceid,
sms_r_system.resourcetype,
sms_r_system.NAME,
sms_r_system.smsuniqueidentifier,
sms_r_system.resourcedomainorworkgroup,
sms_r_system.client
FROM sms_r_system
WHERE sms_r_system.smsuniqueidentifier LIKE "guid:[1-2]%"
View SMSUID=0.wql
SELECT sms_r_system.resourceid,
sms_r_system.resourcetype,
sms_r_system.NAME,
sms_r_system.smsuniqueidentifier,
sms_r_system.resourcedomainorworkgroup,
sms_r_system.client
FROM sms_r_system
WHERE sms_r_system.smsuniqueidentifier LIKE "guid:[0]%"
View Create-CMCB-MpRealTimeScanning.ps1
#Connect to ConfigMgr Site
$SiteCode = "SITECODE" #SiteCode - Modify this for your environment
$ProviderMachineName = "SITESERVER" # SiteServer - Modify this for your environment
Import-Module "$($ENV:SMS_ADMIN_UI_PATH)\..\ConfigurationManager.psd1"
if (-not (Test-Path "$($SiteCode):\")){
New-PSDrive -Name $SiteCode -PSProvider CMSite -Root $ProviderMachineName
}
You can’t perform that action at this time.