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 https://outlook.office365.com/powershell-liveid/ -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 http://repo.zabbix.com/zabbix/2.4/rhel/7/x86_64/zabbix-release-2.4-1.el7.noarch.rpm
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;
exit
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:
http://www.zabbix.com/download.php
Unpack and copy to C:\
edit conf/zabbix_agentd.win.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