Skip to content

scripting

need to script something ? do it here

  1. Hello all Running SCCM 1606 Hoping I can get a push in the right direction. I'm looking to uninstall a program on a few hundred PC's. The package was deployed via SCCM , but the uninstall does not work so I dug up an PS script from online. The following PS Script works just fine if it's ran locally on the clients. $appVer = Get-ChildItem -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall, HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall | Get-ItemProperty | Where-Object {$_.DisplayName -match "Some Application" } | Select-Object -Property DisplayName, UninstallStrin…

  2. Started by Jimm,

    Good day, I'm preparing a security audit against our numerous SCCM servers. I am currently using a export from within the console to obtain all of the class security rights for each server. I have the SCCM SDK but am not that strong into vbs to be able to determine how I can go about getting the class security from my servers. If someone could get me started, I can take it from there. Jimm

  3. Started by Xpdite,

    Hi I have been tasked with setting up a compliance rule to check for the existence of a certificate in the trusted root of the corporate Windows 7 Desktops and remediate if possible. I have been having difficulty trying to figure out how to accomplish this. I did find a link suggesting to use a powershell script but I seem to be getting very mixed results. I have included the script below If anyone has any idea's on how I can accomplish this or can point me in the right direction it would be appreciated. This is the script I was trying with out reliable success: $Compliance = 'Non-Compliant' $Check = get-childitem -path cert:\localmachine -recurse | where-obj…

  4. Started by gatorcb,

    We are trying to migrate from 2007 to 2012. Our collections won't migrate because we are using queries that reference a 3rd party product in 2007 that's not installed in 2012. Here's what we have 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.SystemGroupName = "DOM\\APP-AdobeApproval" or SMS_R_System.ESDmemberof = "DOM\\APP-AdobeApproval" Since we have over 1000 collections and are still using ESD, we'd like to have a script return the above data to a file. Then we break that file up into smaller sections (…

  5. following the instructions here: http://blogs.technet.com/b/deploymentguys/archive/2012/02/15/expiring-outdated-stand-alone-media.aspx my tsconfig is as follows: [CustomHook] CommandLine="cscript.exe X:\ExpiredUFDCheck.vbs" CommandLine="wscript.exe X:\Deploy\Scripts\ZTIMediaHook.wsf" The ORIGINAL vbs file is as follows, which will not function for me and just throw errors and the logic seems wrong so I corrected it, ( changes annotated). On Error Resume Next ' // --------------------------------------------------------------------- ' // Find the environment variable %configpath% for location of UFD ' // --------------------------------------------------------…

    • 1 reply
    • 5.6k views
  6. I'm trying to run a script against my computers with SCCM. It's a very simple powershell script (it has to be, I'm not much of a scripter), and it works perfectly from the command line. However, when I try to deploy it from SCCM it fails every time. I've tried writing directly to the share, I've tried mapping a drive, I've tried deploying it with admin rights and using the logged in user's rights. I'm hoping someone here can tell me what I'm doing wrong. The script is below. I know it works, but I don't know why I can't deploy it. # Write the value of the AutoAdminLogon key to $val $val = Get-ItemProperty -Path "hklm:\SOFTWARE\Microsoft\Windows…

  7. Hi all I have a unique situation, here is what i would like to do, unfortunatley not too skilled with PS. Every time a message ID 10800 is generated (10800 Informational Advanced Client The SMS Advanced client was installed. The current version is %1.) i would like to check for the left 3 characters of the computer and based on that add it to a specific collection. the collection is a direct membership with OSDAllowed = False, so no one can deploy to that system by mistake. Any help on how to do this greatly appreciated. Update: I actually had to use 10804, which is when the client is assigned. I am sure there is a way for a nicer and cleaner code :-( <> …

    • 0 replies
    • 4.1k views
  8. Started by pungdoft,

    I found this script for naming wimfiles during ztibackup but I cant get it to run. Get lots of errors, even after removing all the "'s. Can someone help me? —script begin— set env = CreateObject(“Microsoft.SMS.TSEnvironment”) Set ProgressUI = CreateObject(“Microsoft.SMS.TsProgressUI”) ProgressUI.CloseProgressDialog BackupFile = InputBox(“Name of wim file”) env(“BackupFile”) = BackupFile —script end—

    • 0 replies
    • 3.2k views
  9. Here is script...... Copy-Item "\\fileserver\SCCM\Resources\Laserfiche\Laserfiche.url" -Destination "C:\Users\Public\Desktop" Shortcut never appears.

  10. I am working for a company who is looking to create a new Windows 10 image. I have a powershell script that prompts for a Computer name and this all works fine by passing the OSDComputerName variable to the TS. I'm trying to introduce is another powershell script that will ask the user to select one of 2 domains. This is done by selecting one of 2 radio buttons in a Powershell Form called by a function. Whichever one is selected will create a custom TS variable and the variable will be passed on later to the Task Sequence and the correct Network Settings will be set dependent on which domain is selected. The problem is the Domain Select script doesn't seem to run as p…

  11. Trying to find out how to add Active Directory Groups (ex: Client Support, Eng Team) to local computer groups (ex: Administratiors). I need to add multiple AD Groups to differnt local computer groups (Administrators, Remote Desktop). Can anyone help?

  12. Started by petebuk,

    Hello there: I have the below scritpt to add a local admin account to a list of computers in a txt file however it will only add thr account to the first computer name in the text file. I have one computer name per line in the text file itself. Any Ideas? ' -------------------------------------------------------- ' VARIABLE DECLARATIONS ' -------------------------------------------------------- Option Explicit Dim strFile Dim objFSO, objTS, strComputer, objNetwork, objComputer, colAccounts, objUser, objGroup ' -------------------------------------------------------- ' STATIC VARIABLE ASSIGNMENTS ' -----------------------------------------------------…

    • 0 replies
    • 5.3k views
  13. I run a large SMS 2003 environment we currently in the process of moving to SCCM 2007. We have a tool that allows help desk personnel to push SMS packages to individual computers via a small .Hta script that has just a two line interface COMPUTER NAME and PACKAGE. We would like to continue using this tool in SCCM but I would like to know if there is a better tool out there that would give Help desk personnel better functionality. Below is the .hta Script we currently use. </head> <script language="VBScript.Encode"> '**Start Encode** Option Explicit 'Initialize: Dim strCollectionList : strCollectionList = "" Dim strVerifiedColl :…

  14. Hi, I am looking for a script to copy the Group Membership of one system to another in AD from a system which is not connected to domain, below is the script which i wrote but getting error " Could not find the Name or Insufficient Rights to see Name, at this stage "objTrans.Set ADS_NAME_TYPE_NT4, strDomain & "\" & strComputer2 & "$" " please help Basically what the script does is it will prompt for Old computer name for Source & new computer for destination & it will create a computer account & copy the group membership from source to destination computer. Option Explicit Dim strComputer1, strComputer2, strDomain, strOU, intAnswer, …

  15. Started by packager,

    Hi, What is the best way to make sure files from a folder is regularly deleted ? A script that would do that which can be deployed using SCCM or a script that would be deployed by SCCM that will make use of Task Scheduler ?

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.