- Copy the folder containing the relevant files into your test system.
- Modify settings at your convenience:
- Right-click on
Config.ps1
- Select "Open with" and choose "WordPad".
- Right-click on
- Right-click on
RunUserSimulation.ps1
and select "Run with PowerShell". - Logs will be stored in the
Logs
folder, named by date and time.
- See "Setup the Environment" first.
- Right-click on
RunUserSimulation.ps1
and select "Run with PowerShell". Accept the UAC prompt.
If you plan to clone VMs, follow these steps first. If you already have multiple VMs, apply these steps to each one.
To authorize script execution:
Set-ExecutionPolicy -Scope CurrentUser Bypass
Answer A
(yes for all) when prompted.
- Open a PowerShell prompt via
Windows + X
-> "Windows PowerShell".
- Connect VMs to a common network.
- On each VM:
- Disable the firewall for public networks.
- Enable network discovery for public networks.
- Ensure each machine has:
- A unique name.
- A unique IP address (use DHCP or configure a static IP).
- A unique MAC address.
- Avoid naming PCs as "Local", "All", "First", or "Random" (case insensitive) as these conflict with scheduling features.
In the guest OS:
- Open Control Panel -> Network & Sharing Center -> Change Adapter Settings.
- Right-click on the Ethernet adapter and select "Properties".
- Select IPv4 and click "Properties".
- Configure the following:
- IP Address: e.g.,
192.168.0.10
- Subnet Mask:
255.255.255.0
- Default Gateway:
192.168.0.1
- IP Address: e.g.,
On the host OS:
- Open a shell and navigate to the VirtualBox software directory (e.g.,
C:\Program Files (x86)\Oracle\VirtualBox\
). - Run the following command:
VBoxManage dhcpserver add --netname intnet --ip 10.13.13.100 --netmask 255.255.255.0 --lowerip 10.13.13.101 --upperip 10.13.13.254 --enable
Run the EnableEverything.ps1
script twice:
- Right-click on
EnableEverything.ps1
. - Select "Run with PowerShell" and accept the UAC prompt.
- Boot one VM (preferably the one with the lowest static IP if applicable). This will be the master VM.
- Once the master VM has booted and you have logged in, boot the other VMs.
- On the master VM, run the
RunUserSimulation
script as an administrator.
- On the master VM:
- Open the
Config.ps1
file. - Locate the
global:global_localonly
option and change its value from$true
to$false
.
- Open the
- Ensure each VM has a copy of the
user simulation script
folder in the same path. - Global configuration options (e.g.,
global_localonly
) apply to all PCs. - Module configuration options apply only to the local PC (e.g., browsing, mapping shares).
- The script can connect to an unlimited number of networked computers. Ensure your hardware can handle the network topology.
- A safe limit is 32 networked PCs.
- Enable
$global_schedule
in the configuration file. - Modify the
schedule.txt
file. The first line must always be:
Stop All activity on All after 00:01
- Use the following structure for subsequent lines:
<Start|Stop> <activity> on <All|Local|First|Random|[PC Name]> after <HH:mm>
- Start/Stop: Define the action to perform.
- Activity: Specify the activity (e.g.,
All
,IE
,MapShare
,Type
). - On: Define the target PCs (e.g.,
All
,Local
, specific PC names). - After: Specify the time to perform the action (24-hour format).
- Do not repeat the same line in the file.
- The program may take up to one minute to execute the orders.
The script runs in rounds. Each round includes multiple activities (e.g., browsing, mapping network shares). After completing a round, the script waits for an inactivity period specified in the configuration file.
- Create a shortcut to the
RunUserSimulation.ps1
file. - Move the shortcut to the startup folder (
Windows + R
, typeshell:startup
). - Ensure script execution is activated as described above.
- This script should run exclusively on the computer to avoid interference with its operations.
- The script forcibly interacts with the environment (e.g., opening/closing applications like Internet Explorer).
You are ready to run the script!