Instantly share code, notes, and snippets.

View Gruppo_dipendenti.ps1
Import-Module ActiveDirectory
$groupname = "CN=CONTOSO_Dipendenti,OU=Contoso,OU=Gruppi,DC=contoso,DC=local"
$users = Get-ADUser -Filter * -SearchBase "OU=Contoso,OU=Utenti,DC=contoso,DC=local"
foreach($user in $users)
{
Add-ADGroupMember -Identity $groupname -Member $user.samaccountname -ErrorAction SilentlyContinue
}
$members = Get-ADGroupMember -Identity $groupname
foreach($member in $members)
{
View arch_wmi_conn_getdwordvalue.vbs
Const HKEY_LOCAL_MACHINE = &H80000002, HKLM = &H80000002
WScript.Echo GetDWordValue (".", HKEY_LOCAL_MACHINE, "SOFTWARE\Altiris\Client Service", "UserInfoInterval", 32)
WScript.Echo GetDWordValue (".", HKEY_LOCAL_MACHINE, "SOFTWARE\Altiris\Client Service", "UserInfoInterval", 64)
Function GetDWordValue (ByVal Resource, ByVal hDefKey, ByVal SubKeyName, ByVal ValueName, ByVal Architecture)
Const wbemAuthenticationLevelPktPrivacy = 6
Const wbemImpersonationLevelImpersonate = 3
Dim oCtx: Set oCtx = CreateObject("WbemScripting.SWbemNamedValueSet")
oCtx.Add "__ProviderArchitecture", Architecture
View OfcProductKey.ps1
function Get-MSOfficeProductKey {
param(
[string[]]$computerName = "."
)
$product = @()
$hklm = 2147483650
$path = "SOFTWARE\Microsoft\Office"
foreach ($computer in $computerName) {
View personalTitleModifier.vbs
' "personalTitle" Modifier (LDAP attibute)
' -----------------------------------------------------------------------------------------------------------
' Autore: GSolone
' Versione: 0.1
' Utilizzo: .\personalTitleModifier.vbs
' .\personalTitleModifier.vbs mario.rossi
' ATTENZIONE: utilizzare -se possibile- direttamente sul DC
' Ultima modifica: 27-02-2018
' -----------------------------------------------------------------------------------------------------------
' Fonti utilizzate:
View disqusrecents.php
<?php
/*
Plugin Name: Disqus Recents Widget
Plugin URI: https://public.gfsolone.com/wiki/doku.php?id=wordpress:disqusrecents
Description: Mostra gli ultimi commenti lasciati nel sistema Disqus installato sul tuo Wordpress.
Version: 0.8
Author: Gioxx
Author URI: https://gioxx.org
License: CC BY-NC-SA 4.0
*/
View Strunz_Interceptor.csv
source target regex type code match hits title
/wp-includes/js/crop/config.php https://www.radiomaria.it/ 0 url 301 url 0
/wp-caches.php https://www.radiomaria.it/ 0 url 301 url 0
/wp-content/plugins/google-sitemap-generator/.move2.php https://www.radiomaria.it/ 0 url 301 url 0
/wp-includes/js/crop/systems.php https://www.radiomaria.it/ 0 url 301 url 0
/wp-content/plugins/wpwhatsmyrankvideoregular-unlimited/php-ofc-library/ofc_upload_image.php https://www.radiomaria.it/ 0 url 301 url 0
/wp-content/themes/evolve/js/back-end/libraries/fileuploader/upload_handler.php https://www.radiomaria.it/ 0 url 301 url 0
/wp-includes/js/crop/bacot.php https://www.radiomaria.it/ 0 url 301 url 0
/wp-content/uploads/accesson.php https://www.radiomaria.it/ 0 url 301 url 0
/kickstart.php https://www.radiomaria.it/ 0 url 301 url 0
View DiskCleanup.ps1
#http://gregramsey.net
#more info here:
#http://support.microsoft.com/kb/253597
#ensure we're running on windows 7/8/10
$Sistema = (Get-WmiObject -class Win32_OperatingSystem).Caption
if ($Sistema -like '*7*' -or $Sistema -like '*8*' -or $Sistema -like '*10*') {
#Capture current free disk space on Drive C
$FreespaceBefore = (Get-WmiObject win32_logicaldisk -filter "DeviceID='C:'" | Select Freespace).FreeSpace/1GB
View NotifyKace.vbs
' Verifica esistenza servizio QUEST Kace (KONEA) e ultimo inventario
' -----------------------------------------------------------------------------------------------------------
' Author: GSolone
' Version: 0.3
' Last modified: 13-12-2017
' Credits: https://www.symantec.com/connect/downloads/vbscript-delete-old-files
' http://www.robvanderwoude.com/vbstech_network_ip.php
' http://www.robvanderwoude.com/vbstech_network_names_computer.php
' https://social.technet.microsoft.com/Forums/en-US/a8d29535-217e-46c0-bd94-0a203a322015/current-logged-in-user-using-vbscript?forum=ITCG
' https://gallery.technet.microsoft.com/scriptcenter/01fcf945-ad73-44e0-8cb5-152432bc6bcf
View NotifyKace.vbs
' Verifica esistenza servizio Dell Kace (KONEA) e ultimo inventario
' -----------------------------------------------------------------------------------------------------------
' Author: GSolone
' Version: 0.2 rev1
' Info: https://gioxx.org/tag/VBScript
' Last modified: 16-10-2017
' Credits: https://www.symantec.com/connect/downloads/vbscript-delete-old-files
' http://www.robvanderwoude.com/vbstech_network_ip.php
' http://www.robvanderwoude.com/vbstech_network_names_computer.php
' https://social.technet.microsoft.com/Forums/en-US/a8d29535-217e-46c0-bd94-0a203a322015/current-logged-in-user-using-vbscript?forum=ITCG
View SavePDF_Module.bas
Attribute VB_Name = "SaveModule"
' Outlook 2016: Save all PDF Attachments
' -----------------------------------------------------------------------------------------------------------
' Author: GSolone
' Version: 0.2
' Based on: "Run a Script Rule to Save Attachments"
' (https://www.slipstick.com/developer/save-attachments-to-the-hard-drive/)
' Last modified: 21-12-2017
' Credits: http://www.visual-basic-tutorials.com/Tutorials/MsCodes/get-special-directories-path-in-visual-basic.htm
' http://www.vbaexpress.com/forum/showthread.php?7866-Check-for-folder-create-if-it-does-not-exist