Skip to content

scripting

need to script something ? do it here

  1. Started by jamitupya,

    Im trying to output the content from from a tracert command to excel however i am unsure how i can output this in an excel cell.... any ideas? Set WshShell = WScript.CreateObject("WScript.Shell") Ping = WshShell.Run("ping -n 2 -a " & HostName, 0, True) tracert = WshShell.Run("tracert -4 " & HostName, 0, True) objExcel.Cells(intRow, 1).Value = UCase(HostName) Select Case Ping Case 0 objExcel.Cells(intRow, 2).Value = "OK" Case 1 objExcel.Cells(intRow, 2).Value = "NG" End Select Select Case tracert Case 0 objExcel.Cells(intRow, 3).Value = "OK" Case 1 objExcel.Cells(intRow, 3).Value = "NG" End Select Basically PING is OK and NG and works per…

    • 0 replies
    • 5.1k views
  2. Hi, my intention is to copy 2 files into a folder, where only the admin own full permissions. Normal user have only read permissions. The destination directory is: C:\Program Files\Java\jdk1.8.0_45\jre\lib\security The new two files are: jocal_policy.jar and us_export_policy.jar i have to overwrite two files in destination folder, because they are to old. (or first, i delete the old two files and then copy the new two files) Here is my Batchfile, but i dont understand why nothing changes, if i send the batch file to a client: del "C:\Program Files\Java\jdk1.8.0_45\jre\lib\security\*.jar" copy %~dp0local_policy.jar "C:\Program Files\Java\jdk1.8.0_45\jr…

    • 0 replies
    • 3.6k views
  3. 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!

  4. Started by jamitupya,

    This script will load a command line variable for the username or can auto to administrator and password from an ini file. ' Initialization Set wshNetwork = CreateObject("WScript.Network") Set shell = CreateObject("WScript.Shell") Set fs = CreateObject("Scripting.FileSystemObject") ' Get parameters Program = "AutoLog.vbs" If WScript.Arguments.Count > 0 then username = WScript.Arguments.Item(0) Else username = TranslateLocalUser("Administrator") End if If WScript.Arguments.Count > 1 then password = WScript.Arguments.Item(1) Else password = ReadIni("C:\Build\Settings.ini", "LocalAdmin", "localAdminPassword") End if computerName = wshNetwork.Com…

    • 0 replies
    • 10.4k views
  5. Started by Kingskawn,

    In a command-prompt windows just type: "WMIC ComputerSystem GET Model" I had to use this several times to know exactly which computer model I had

    • 0 replies
    • 3.6k views
  6. Started by Unique01,

    Hi, Due to some lost machines on our network, i came up with an ideia...possibly a stupid (or not the best) one My idea was to create a script to run everyday through scheduled task on the client computer. The basic function of the script would be to ping a domain controller to check the presence of the computer on our offices... If the computer cannot ping a domain controller for 4 months (let's say a smart guy took a laptop to "work" at home), it would run an action, (lock computer, delete something, put it in loop, something) to force the user to bring back the computer to out IT team. Any ideas where i should start? Any different approaches? Any suggestion wi…

    • 0 replies
    • 2.6k views
  7. 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
  8. Started by LeeF,

    This may very well overlap a few topics but I have a need for a PS script that I can assign to a Configuration Item and a Configuration Baseline. I have the PS scripts but need advice how to run the script as it fails due to the fact by default CM Clients run at the level of All Signed. I thought I could just add at line 1 Set-ExecutionPolicy ByPass within the remediation script as follows Set-ExecutionPolicy ByPass $MinDays = 14 $UIResourceMgr = New-Object -ComObject UIResource.UIResourceMgr $Cache = $UIResourceMgr.GetCacheInfo() $Cache.GetCacheElements()| where-object {[datetime]$_.LastReferenceTime -lt (get-date).adddays(-$mindays)}| foreach {$Cache…

  9. Started by Eze,

    Please do you have a handy PowerShell script to - delete object from SCCM and Active directory simultaneously.

    • 0 replies
    • 2.3k views
  10. Started by Eze,

    Please do you have a handy PowerShell script to - delete object from SCCM and Active directory simultaneously.

  11. 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
  12. Started by chris83,

    Hello, i will change the Accent Color in Windows 10 with sccm. This not work reg add HKU\DefaultUser\Software\Microsoft\Windows\DWM /v "AccentColor" /t REG_BINARY /d ff767676 /f reg add HKU\DefaultUser\Software\Microsoft\Windows\DWM /v "ColorizationColor" /t REG_BINARY /d c4767676 /f reg add HKU\DefaultUser\Software\Microsoft\Windows\DWM /v "ColorizationAfterglow" /t REG_BINARY /d c4767676 /f i need only the change from blue (standard) to grey

    • 0 replies
    • 3.3k views
  13. Hi guys, I've got reboot task sequences setup for all my patch groups to ensure they are ready to be patched and are compliant. We are a retail facility and had a patching freeze over Thanksgiving. I was asked to shut off ALL reboot task sequences during the blackout, not just on the ones that would have patched groups during that freeze. Most of my patch groups throughout the month fall on an early Sunday morning when things are quiet. However, I enabled the pre/post RTS (reboot task sequence) for my dev group at 4:40 PM on Friday for a Sunday morning patching and they ended up grabbing the policy and rebooting around 5:10ish. Needless to say I shut off the o…

  14. Need help building one PowerShell script to run on Windows XP and Windows 7 If possible. I need the script to perform the following functions. Remove all temp files for all users Empty Recycle Bin for all users Empty Temp Direrctory Empty Temp Internet Files for all users Delete User Profile's 90+ days inactive Run Check Disk Clean up tool at the end. I have attached a script that was given to me but needs to modified for XP I think and add other items listed above. Disk_Cleaup_Tool.txt

  15. 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?

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.