Tag: script

Active Directory, Microsoft Windows Server 2012

Add Active Directory Multiple Users in a Group

Add multiple User’s to a Group – PowerShell Script Import-module ActiveDirectory Import-CSV "C:\Scripts\GroupUsers.csv" | % { Add-ADGroupMember -Identity TestGroup1 -Member $_.UserName }Import-module ActiveDirectory Import-CSV "C:\Scripts\GroupUsers.csv" | % { Add-ADGroupMember -Identity TestGroup1 -Member $_.UserName } Don’t forget to create a GroupUsers.csv file with users login names.


How to execute a bash script in Ubuntu by double clicking it

> Ensure that your script begins with the correct command. For ex. #!/bin/bash#!/bin/bash > Install dconf Editor: sudo apt-get install dconf-editorsudo apt-get install dconf-editor > Open dconf Editor > Navigate to org > gnome > nautilus > preferences > Find executable-text-activation and from the dropdown menu select launch or ask.

Windows 7

Delete all event logs at once in Windows 7

@echo off FOR /F "tokens=1,2*" %%V IN (’bcdedit’) DO SET adminTest=%%V IF (%adminTest%)==(Access) goto noAdmin for /F "tokens=*" %%G in (’wevtutil.exe el’) DO (call :do_clear "%%G") echo. echo Event Logs have been cleared! ^<press any key^> goto theEnd :do_clear echo clearing %1 wevtutil.exe cl %1 goto :eof :noAdmin echo You must run this script as …


Add javascript files in the template.php – Drupal 7

In template.php function theme-name_preprocess_html(&$variables) { $options = array( ‘group’ => JS_THEME, ); drupal_add_js(drupal_get_path(’theme’, ‘theme-name’). ‘/script.js’, $options); }function theme-name_preprocess_html(&$variables) { $options = array( ‘group’ => JS_THEME, ); drupal_add_js(drupal_get_path(‘theme’, ‘theme-name’). ‘/script.js’, $options); }

Add-ons, Browsers

Security in Firefox with NoScript

One of my favorites addons for firefox that protects me while i am surfing is NoScript! Most of you already know it. NoScript blocks JavaScript, Java and other executable content. It protects from XSS, cross-zone DNS rebinding / CSRF attacks (router hacking), and Clickjacking attempts. It allows executable content to run only from trusted domains …