scripting
need to script something ? do it here
124 topics in this forum
-
The script below will tell me the uptime on PC's. I want to add the language that says if Uptime is greater than X amount of days then it will send a reboot in 15 Mins. Any help would be appreciated. # This PS script provides Uptime and Pingstatus for list of computers. ####################################################################### $names = Get-Content "C:\Test\computers.txt" @( foreach ($name in $names) { if ( Test-Connection -ComputerName $name -Count 1 -ErrorAction SilentlyContinue ) { $wmi = gwmi Win32_OperatingSystem -computer $name $LBTime = $wmi.ConvertToDateTime($wmi.L…
-
-
- 1 reply
- 7.9k views
- 1 follower
-
-
Hey guys, trying to dynamically create a shortcut in the start menu but failing misserably... point is to start this link during our OSD for Windows 7....for all intensive purposes, it should work, but wont display the link in the all users.... ideas? ' Initialization Program = "SetStart.vbs" Set shell = CreateObject("Wscript.Shell") ' Create the shortcut and point it to the specified script (assume C:\Build) ' path = shell.SpecialFolders("ProgramData") & "C:\Profiles\Profiles\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup" & "\Startup.lnk" path = "C:\Users\All Users\Microsoft\Windows\Start Menu\Programs\Startup" & "\…
-
- 3 replies
- 7.8k views
-
-
Dr. Tobias Weltner, a PowerShell MVP has written an excellent eBook about PowerShell. Dr. Tobias Weltner has written many books for Microsoft Press on Windows and scripting techniques so he is a real professional and knows his stuff inside and out. Big surprise: the eBook is FREE! For every one who wants to know more about PowerShell, this is a great opportunity. Go get it NOW from here. via > http://thoughtsonopsmgr.blogspot.com/2010/09/free-ebook-mastering-powershell.html?utm_source=twitterfeed&utm_medium=twitter
-
- 2 replies
- 7.7k views
-
-
I have a short script to modify some HKCU reg entries for the Default user. I want to apply this to the reference image so it gets applied to new users. I know this can be done with GPO. I am using MDT and have it pause after the script runs so I can test it. It is says completed successfully but it doesnt do anything. Even when I run it from a cmd prompt manually during the pause. This does not work when running it manually on a machine either. This is the script @ECHO OFF REM ***************************************************** REM Script configures the Default User Profile REM ***************************************************** echo. echo. Load …
-
- 1 reply
- 7.7k views
- 1 follower
-
-
Hi all, Having an issue re creating our build process in the new SCCM environment i've been building lately. During the deployment of an OS we have two visual basic scripts that run after the OS has been booted into for the first time that add the PC to the correct AD groups and starts the 802.1x service (i know there is probably other ways of doing this but i'd rather replicate than redesign). This works flawlwessly on our current live SCCM but in the new one, which is working with Windows 10 rather than 7, i cannot get it to run during the TS, i just receieve an incorrect function error, whereas if i run the script manually on the Windows 10 machine it works as exp…
-
- 3 replies
- 7.7k views
- 1 follower
-
-
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
-
-
Afternoon all, I am trying to setup a simple script that will determine if Drive E: exists and if so is it a CD Rom drive. Then based on that info run install command line. The if else logic seems to work but I'm having a hard time getting the install cmd to run. Any help would be greatly appreciated, I'm also open to other ways of doing this. Exit code btw is 1622. Cheers, Mike $instdir = Get-WmiObject -Class Win32_LogicalDisk | Where-Object {$_.DeviceID -eq "E:"} If (!($instdir)){ $process = start-process -filepath "setup.exe" -argumentlist '/s /v"/l*voicewarmup \"%temp%\besclientinstall.log\" INSTALLDIR=\"C:\Program Files (x86)\BigFix Enterprise\…
-
- 3 replies
- 7.5k views
-
-
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
-
- 1 reply
- 7.4k views
-
-
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 replies
- 7.2k views
- 1 follower
-
-
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 …
-
-
- 1 reply
- 7.2k views
-
-
I am very limited in my scripting abilities. I need a script that will change proxy settings per location. Example: Setting at this location the IP of the machine is 172.xx.xxx.xx (DHCP) and the proxy setting is 192.xxx.xxx.xxx port xxxx. I travel to another location the IP of the machine is 164.xx.xxx.xx (DHCP) and the proxy setting is 192.xxx.xxx.xxx port xxx. The proxy servers and the ports are different. Right now when someone travels to the offsite location we have to move them from one OU to another in order for the proxy to be set correctly. Could anyone be of help or point in the right direction. Thanks in advance. Kathy
-
- 4 replies
- 7.2k views
- 2 followers
-
-
Is there a way to create multiple Deployment Types under one application. I am using Add-CMScriptDeploymentType and get an error on the second one. Add-CMScriptDeploymentType : ConfigMgr Error Object: instance of SMS_ExtendedStatus { Description = "The digest is not valid"; ErrorCode = 1078462235; File = "..\\sspconfigurationitem.cpp"; Line = 1980; Operation = "PutInstance"; ParameterInfo = ""; ProviderName = "ExtnProv"; SQLMessage = "[42000][3998][Microsoft] [SQL Server]Uncommittable transaction is detected at the end of the batch. The transaction is rolled back."; SQLSe…
-
- 4 replies
- 7.2k views
-
-
Hi, is there a ADSSecurity.dll for a 64 bit OS? I need to copy, change permissions from folders via vbscript? On 32 it will work, but my os is 64 bit... thanks for any information..
-
- 2 replies
- 6.9k views
-
-
Hi, In my company, due to security reasons then not installed Microsoft Office application. I want a script for bulk id creation with out excel sheet. if you have any idea on this ,please help me. Thanks in advance. Badri.
-
- 4 replies
- 6.9k views
-
-
Hi Guys, I would like to add domain users to be able to log on via RDP to their desktop via script or GPO. Basically, all our desktops are named after the user who uses it. Dersktop=sjobs-xp1, sjobs-ws1 and Username=sjobs Can you guys advise me how can I achieve this? Any scripting ideas on windows? We also just started using SCCM, so anything there can also work.
-
-
- 1 reply
- 6.7k views
-
