scripting
need to script something ? do it here
124 topics in this forum
-
Hello Not sure where to post this so sorry if in worng place Thank you for reading my post. I am brand new to scripting so my apologies if this is rather basic – But everyone starts somewhere. We are running Windows 7 desktop on a 2003 Enterprise domain. I need to copy some short cuts files (eod8 extension) to the start menu under “All Programs” in a folder called “EOD”. The users must be able to save and open the shortcuts (so using the All Users folder did not work since a standard user can’t save to that location) So I am copying the files to the local user profile. My Script setlocal set Installpath=%~dp0 mkdir "C:\Users\%username%\AppData\Roaming\Mi…
-
- 0 replies
- 6.7k views
-
-
Hi WN I created a function to connect to the CMSite and load the cmdlet for ConfigurationManager. Could the function be improved in any way or is it as good it can be? is the logic best practice or? You can download it at : https://gallery.technet.microsoft.com/Connect-ConfigMgr64-db5e9d0a function Connect-ConfigMgr64 { $initParams = @{ } if ((Get-Module ConfigurationManager) -eq $null) { try { Import-Module "$($ENV:SMS_ADMIN_UI_PATH)\..\ConfigurationManager.psd1" @initParams -Scope Global } catch { $ModulePath = (Get-ItemProperty HKLM:\SOFTWARE\Wow6432Node\Microsoft\ConfigMgr10\Setup -Name "UI Installation Directory").'UI Installatio…
-
- 0 replies
- 5.5k views
- 1 follower
-
-
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
-
-
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
-
- 0 replies
- 3.6k views
-
-
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
-
- 0 replies
- 3k views
-
-
Hi, I am trying to create a script that automatically populates a database with existing computers. It queries the local machine for UUID and computername then creates a new record for the machine in the database. This works perfectly at the moment. The problem is, once the record is created, the linked view "ComputerSettings" isn't updated. I am looking for a way to programatically update the ComputerSettings view using vbscript. Does anyone have any ideas? The database i am referring to is MDT
-
- 0 replies
- 3.3k views
- 1 follower
-
-
Hi WN im working on a script where i want to pass a param to the script. When I run it without any param it install the regedit changes. I want to use the same script for the clean up. like this: newdev.ps1 -uninstall then do this and this how do i get this to work?
-
- 0 replies
- 4k views
-
-
I've just spent ages working through various methods for deploying Open Office 3.3 silently using SCCM 2007. I finally have a working solution so I thought I should share it. You need the Open Office 3.3 installer from OO's website and the DisableFirstStartWizard.oxt file, also available on their site. This particular install routine disables the first run wizard (leaves the user name fields blank), disables any on-line checking for updates and leaves the default file save as type as open document format. Extract the set-up file into an install folder and copy the oxt file into the same place. The batch file is; start /wait msiexec /qb /norestart /i openofficeo…
-
- 0 replies
- 5.1k views
-
-
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
-
-
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
-
-
Hi I am looking for a good way to run a script in powershell, to detect my site from an XML. We are currently using MDT to do this, but we cannot be completely automated due to the fact that we often build our machines on a central site and ship them out. This this end, I am putting together an XML file to pull the default settings as below. I'm happy with the 2nd (locale)section and how I can use it, I'm not sure how to approach the first section, pulling the gateway out and assigning the 3 letter site code. We have a lot of subnets of each site, so if I can list all the subnets, then assign the site code, that's how I would do it. My XML file: <?xml version="…
-
- 0 replies
- 4.8k views
- 1 follower
-
-
Greeting All, I am trying to come up with away to duplicate my desktop in windows 8.1. I have found many articles about customizing the Start Screen when imaging, but I can not find anything about customizing the desktop when applying a windows 8.1 image. Can anyone help me with a script to customize the desktop on a windows 8.1 image, or even point me towards a few articles that discuss cloning the layout of a windows 8.1 desktop not Start Screen. Thanks all
-
- 0 replies
- 2.6k views
-
-
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
-
-
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.1k views
-
-
Hello, I had a question on PowerShell Version: 5.1.19041.1023 If you look at the attached screenshot you'll see what I'm curious about. I run this command in PowerShell ISE: Get-CimInstance -ClassName win32_computersystem -Property * | Get-Member -MemberType Method You see what it displays in the display window. But when I run WEBMTEST and I choose OPEN CLASS and then Win32_ComputerSystem you'll notice the METHODS don't match what you see in the ISE command. My question is why? Thank you.
-
- 0 replies
- 2.2k views
-
