Skip to content

scripting

need to script something ? do it here

  1. Started by Settat,

    I am trying to create a simple PowerShell script to protect a specific Task Sequence with a password. Any help is going to be appreciated. SCCM 2207. Thank you!

  2. I have a software that is putting files in users %temp%-folder. As we have AppLocker preventing installations from ANY standard temp-folders, I need to change this How can I script change of users %temp% folder, to another location, temporary?

  3. Hey Just want to streamline this code a little, it does what I need it to do but think it can be smoother. So I query all installed apps on a x64 Win 7 box, creates an array, I check if the array contains the program I'm looking for and if true do nothing else install program. Is using IF the best way, cleanest way? I'm integrating it into the app deployment toolkit as there are a number of applications I have to install that required multiple components and want to make sure it checks if needed or not (during some testing it failed when the application was already installed). Code just looks messy. (Write-host is only there for testing to make sure it does wh…

    • 0 replies
    • 4.4k views
  4. $a = "C:\Program Files (x86)\Google\Chrome\Application\80.0.3987.149\Installer\setup.exe --uninstall --system-level --verbose-logging" $a -replace '([^\\]*)$' Suppose my condition is like this How do I extract the desired folder name $b = $a -replace '([^\\]*)$' $b = google or $b =chrome or $b = Application

    • 1 reply
    • 3.6k views
  5. Started by anyweb,

    let's say you need to pull values from the operating system WMI class, in XP you can do as follows:- open a command prompt and try this wmic.exe path win32_BaseBoard get /format:htable > win32_BaseBoard_test.html the above will pull all values for win32_BaseBoard and place the output in a html formatted table which you can view in Internet Explorer (will not display correctly in Firefox). attached is an example output of the above code. cheers anyweb win32_BaseBoard_test.html

  6. Started by Adam Branham,

    Hello all I am trying to learn all I can about SCCM for future employment however at this time I have no access to push patches using it. From time to time I am asked to patch multiple system and doing them one by one is a pain. I have been unable to find anything which was helpful and had some type of logging for patches so I punched this up. Eventually I will be expanding on it and will have some error control when the execution of the script fails but I am still working on that. If anyone has some input on it please let me know. Until then enjoy and I hope it helps you out. RemInstall.zip

  7. Started by MadMacs77,

    Environment: SCCM 2012 sp1 Problem: Installs of Flash are failing with error 1603 Workaround: User runs http://support.microsoft.com/mats/program_install_and_uninstall/ Desired solution: Running a fixit script via a package on a collection of machines with these failed installs. Has anyone done this before, or knows how? I've been poking at it, but I've not found a clear "Here's how to script fixit" Thanks

  8. Can someone show me a sample of script that has an "if exist" statement that checks if the network printer is connected to the current PC. I have this on part of my script that removes a network printer. But, I would like to add an "if exist" statement that checks and then removes if it does exist. ******* Dim DelPrint, UNCpath UNCpath = "\\server\network_printer1" Set DelPrint = WScript.CreateObject("WScript.Network") DelPrint.RemovePrinterConnection UNCpath, true, true ******* Many thanks,

    • 0 replies
    • 4.2k views
  9. Hey Everyone, I've got a batch file that I'm trying to get to work and seem to be running into difficulties on getting the whole batch file to work. I'm guessing that I have something missing or incorrect. What I'm trying to accomplish is we currently have Java versions 7.0.45 both x64 & x86 platforms installs on all production client machines. My batch file will uninstall the x86 version of Java 7.0.45 and then install the latest version of Java 7.0.51 x86 without any problems. It's the x64 that my batch file is running into problems and does not uninstall it or install the new version of java (7.0.51 x64). Here's what my batch file looks like: @ECHO …

      • Like
    • 1 reply
    • 7.2k views
  10. Started by wmmayms,

    When you run scheduled jobs in MS SQL you sometimes want to output the results to a txt file. This works like a charm... However MS tends to add four annoying rows to the top of this output file. I thought it was easy to remove these rows with a simple vbs/batch command....but No!! Since it´s unicode format it gets a bit harder... here is the code i ended up using: 'Written by wmmayms 13/12 - 2010 Option Explicit strTextFile = "<----ADD PATH TO YOUR TXT FILE HERE---->" Dim objFSO, objFile , strTextFile, strData, strLine, arrLines, i CONST ForReading = 1 CONST ForWriting = 2 'Create a File System Object Set objFSO = CreateObject("Scriptin…

    • 0 replies
    • 3.4k views
  11. Looking to rename but have no idea how to package this. My script is below and think I'd have to bypass execution policy. Rename-Computer -NewName "PC0001" -DomainCredential Domain01\Admin01 -Restart Just not sure how to create a package for something like this.. Thanks for any replies.

    • 2 replies
    • 4.2k views
  12. Started by Alejandro Suarez,

    I need help I'm new on SCCM. I need to rename a Hyper V virtual machine. i'm using this settings on customsetting.ini TS fails. task sequence error 0x80220005 when i use laptop or desktop works perfect but fails when deploying Hyper V VM [Settings] Priority=ByLaptop, ByDesktop, ByVM, Default Properties=MyCustomProperty [ByLaptop] subsection=Laptop-%IsLaptop% [Laptop-True] OSDComputerName=LT-%SerialNumber% MachineObjectOU=OU=Laptops,OU=USA,OU=Sites,DC=mydomain,DC=com [ByDesktop] subsection=Desktop-%IsDesktop% [Desktop-True] OSDComputerName=DT-%SerialNumber% MachineObjectOU=OU=Desktops,OU=USA,OU=Sites,DC=mydomain,DC=com [By…

    • 1 reply
    • 3k views
  13. Started by ctelfer,

    Hello. I am looking for a way in my OSD deployments to prompt for partition sizes of disks other than the system drive, and to use the input to create and format those drives. Any one done this already? Thanks!

    • 0 replies
    • 3.8k views
  14. Started by rahulrs,

    How can I prevent users to login twice from different machines? The Users should only be allowed to login once on the machine. Once he or she login into different machine, the previous machine will logout automatically. Is it have anyway to set this? (active directory) i knw the way to block with computer id, i want to block with user account? any one knw , plz help???

  15. Started by repacker,

    Hi, I'm searching for a script to delete all files and folders from drive D: but at the same time I'd like to to exclude a few folders and files! A was looking at Robocopy. Here is my testscript: *************** mkdir C:\DELETE robocopy "D:\" "D:\DELETE" /E /MOV /NP /XD "Dir 1" "Dir 20 00" "Dir3" /XF "File 1.dll" "File 2 0 .txt" /R:10 /W:30 rmdir "c:\DELETE" /s /Q ************* It creates a directory > copies everything (except the excluded folders and files) to that directory and than it deletes the directory....but It gives back this message: ERROR: Invalid Parameter #4 : "00 Dir3 /XF File" What is the right command line string? …

    • 2 replies
    • 7.5k views

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.