Change the smtp address of a Microsoft 365 Group

In order to create a remote powershell session to 365, open Windows Powershell and run below commands:

$UserCredential = Get-Credential

and enter your 365 credentials when prompted.
Then type:

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session -DisableNameChecking

To add required smtp address:

Set-UnifiedGroup -Identity "Group Name" -EmailAddresses: @{Add ="[email protected]"}

To promote as a primary smtp address:

Set-UnifiedGroup -Identity "Group Name" -PrimarySmtpAddress "[email protected]"

To remove the old address from the group:

Set-UnifiedGroup -Identity "Group Name" -EmailAddresses: @{Remove="[email protected]"

To end your Exchange Online Powershell session:

Remove-PSSession $Session
Posted in Windows | Leave a comment

Freenas issue when replacing failed disk

When replacing a failed hard disk from the GUI you get the following error:
“Unable to GPT format the disk ada…”.
From the command line:
sysctl kern.geom.debugflags=0x10

dd if=/dev/zero of=/dev/ada3 bs=512 count=1

Posted in Linux | Comments Off on Freenas issue when replacing failed disk

Install Zabbix on Centos 7

Zabbix requires Apache-Mysql-PHP stack to be installed in order to run. You can follow this previous post.
Let’s download and install Zabbix

rpm -ivh
yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent

We have to edit timezone in /etc/httpd/conf.d/zabbix

php_value date.timezone Europe/Athens
service httpd restart

Create a database or Zabbix

mysql -u root -p
create database zabbix character set utf8;
grant all privileges on zabbix.* to 'zabbix'@'localhost' identified by 'password';
flush privileges;
mysql -u zabbix -p zabbix < /usr/share/doc/zabbix-server-mysql-2.4.3/create/schema.sql
mysql -u zabbix -p zabbix < /usr/share/doc/zabbix-server-mysql-2.4.3/create/images.sql
mysql -u zabbix -p zabbix < /usr/share/doc/zabbix-server-mysql-2.4.3/create/data.sql

Edit /etc/zabbix/zabbix_server.conf to set up zabbix database credentials
Start the zabbix-server process

service zabbix-server start
systemctl enable zabbix-server.service

Finally add the necessary firewall rules for snmp and zabbix agent

firewall-cmd --permanent --add-port=161/udp
firewall-cmd --permanent --add-port=10051/tcp
firewall-cmd --reload

Windows agent
Download from:
Unpack and copy to C:\
edit conf/ and add serverip under ‘Passive’ mode
Rename file to zabbix_agentd.conf
Run from command propmt in C:\install_dir –> zabbix_agentd.exe –install

Posted in Linux | Leave a comment