Handy blogs from ITSSIE to help IT Professionals find the information or scripts they need.

Warranty

All scripts or applications are provided AS IS without warranty of any kind. ITSSIE further disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample scripts and documentation remains with you. In no event shall ITSSIE, its authors, or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample scripts or documentation, even if ITSSIE has been advised of the possibility of such damages.

With Microsoft Windows and Microsoft Office both needing to be activated on every workstation, this can become a timely task when working on a large site.

Due to this we have created a batch file to automatically activate these products using Microsoft’s scripting commands.

To use the batch file copy the code below into notepad, change the xxxxx-xxxxx-xxxxx-xxxxx-xxxxx to the product key of the product and then save the file as MicrosoftActivation.Bat

@echo off
cls
echo ###############################################################################
echo #                                                                             #
echo #          #### ITSIE Ltd - www.itssie.co.uk - 0845 805 1106 #####            #
echo #                                                                             #
echo ###############################################################################
echo Activating windows
cscript //b c:\windows\system32\slmgr.vbs /ipk xxxxx-xxxxx-xxxxx-xxxxx-xxxxx
cscript //b c:\windows\system32\slmgr.vbs /ato
echo Activating Office
cscript "c:\Program Files\Microsoft Office\Office14\ospp.vbs" /inpkey:xxxxx-xxxxx-xxxxx-xxxxx-xxxxx
cscript "c:\Program Files\Microsoft Office\Office14\ospp.vbs" /act

 

The sample scripts are provided AS IS without warranty of any kind. ITSSIE further disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample scripts and documentation remains with you. In no event shall ITSSIE, its authors, or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample scripts or documentation, even if ITSSIE has been advised of the possibility of such damages.

A lot of schools we visit require staff to enable and disable the proxy settings to get internet access on their device when switching between onsite and offsite use. This can not only be a time taking task but can also lead to confusion for the less able users.

We have created a batch file you can either set to run every time the user logs on or just have it as a file on their desktop to allow them to easily set if they are using the device onsite or off-site and then making the necessary changes automatically without going through the internet settings pages.

To use the batch file copy the code below into notepad, change the PROXYURL and PROXYPORT to your sites proxy settings and then save the file as SetProxy.Bat.




@echo off
cls
echo ###############################################################################
echo #                                                                             #
echo #          #### ITSIE Ltd - www.itssie.co.uk - 0845 805 1106 #####            #
echo #                                                                             #
echo ###############################################################################
echo Choose: 
echo [1] I am at work 
echo [2] I am at home 
:choice 
SET /P C=[Please enter a number]? 
for %%? in (1) do if /I "%C%"=="%%?" goto 1 
for %%? in (2) do if /I "%C%"=="%%?" goto 2 


:1 
@ECHO OFF 
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /t REG_SZ /d PROXYURL:PROXYPORT /f

goto end

:2
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f

goto end

:end

 

Disclaimer
The sample scripts are provided AS IS without warranty of any kind. ITSSIE further disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample scripts and documentation remains with you. In no event shall ITSSIE, its authors, or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample scripts or documentation, even if ITSSIE has been advised of the possibility of such damages.

 

Exchange Delivery Management

Monday, 13 October 2014 by

Here is a simple script to change all of you exchange groups to only accept email from set people inside you domain, we found a use for this when students started to email the all staff groups from each other accounts,


Get-DistributionGroup | set-DistributionGroup -AcceptMessagesOnlyFromDLMembers "a_Group_Name"

You can also set it so only a user has access to email the group


Get-DistributionGroup | set-DistributionGroup -AcceptMessagesOnlyFrom "a_User_Name"

Or just one Group


set-DistributionGroup -Identity "a_Group_Name" -AcceptMessagesOnlyFrom "a_User_Name"

Here is a powershell script to export all your running VM’s from Hyper v

This script starts by getting a list of all the VMs that are currently not turn off and storing them in a verbal called $RunningVms

Then it will cycle thought all the VMs one by one turning them off, Exporting them to the location that you have asked and then turning them back on, it will then wait 60 seconds and move to the next VM

all you need to change on this is two verbals one to tell the script if you are using a hyper v cluster and the other to tell it where you would like to store the exported VMs


#------------------------------------------------------------------------------------------#
# Title: Export VMs from Hyper V
# Compainey: ITSSIE
# Description: This will get a list of all the VM's that are Currenty Running on hyper v and then
# turn them off and export them to a backup location then turn them back on,
# it will do this one by one for each VM on your hyper v system
# Version: 1.0
# Script type: Power Shell Script
# Changed By:
# Changes Made:
# Change Date:
#------------------------------------------------------------------------------------------#

$UsingCluster = "No" # If you are using a Cluster of VM's then chnage this to Yesbut if it is just one Host then leave it as No
$BackupLocation = "C:\TempBackup\" # Change this to the location that you want the exported vm to be saved to

# Do not edit below this line

Remove-Item -Path $BackupLocation -Recurse
mkdir $BackupLocation

If ($usingCluster -Eq "No") {
$RunningVms = Get-VM | Where-Object {$_.State -ne "Off"}
$RunningVms has a list of all VMs that the script will export

} Else { $RunningVms = Get-ClusterNode; ForEach($item in $RunningVms) {Get-VM -ComputerName $item.Name; } } ForEach ($name in $RunningVms) { Stop-VM –Name $name.name -TurnOff -Force Eport-VM –Name $name.name –Path $BackupLocation Start-VM –Name $name.name Start-Sleep -s 60 } 

This script comes as is and has no support

Schedule Users Password Change

Monday, 13 October 2014 by

With passwords the first part of a secure network you need to make sure your users change passwords on a regular basis.

While some sites are using the built-in password expiry system on their networks, we often find that this can either force password changes too often or not often enough for individual requirements.

Here at ITSSIE we have created a PowerShell script that can be set on the task scheduler to allow you to request a group of users to change their passwords at next login on a date that suits you.

To use the PowerShell  script, copy the code below into notepad, change the GROUPNAME to the name of the group you wish to force a password change on, and save the file as a “PasswordChange.ps1” on your domain controller. Once you have created this file, you can then create a task schedule to launch the script at the required dates.

cls
Write-Host "###############################################################################"
Write-Host "#                                                                             #"
Write-Host "#          #### ITSIE Ltd - www.itssie.co.uk - 0845 805 1106 #####            #"
Write-Host "#                                                                             #"
Write-Host "###############################################################################"
import-module ActiveDirectory
Get-ADGroupMember - Identity "a test Group" | Set-ADUser -ChangePasswordAtLogon $true

Disclaimer

The sample scripts are provided AS IS without warranty of any kind. ITSSIE further disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample scripts and documentation remains with you. In no event shall ITSSIE, its authors, or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample scripts or documentation, even if ITSSIE has been advised of the possibility of such damages.

TOP support
icon
Need Help?
Close
call
0845 805 1106
skype
Skype Chat
menu-icon
Support Ticket