Check if file or folder exists on multiple computers #PowerShell

$Computers = Get-content “\\server\path\computers_all.txt”
$Output = ForEach ($Computers in $Computers) {
$Test = Test-Path -path “\\$Computers\C$\Program Files\office\”
If ($Test -eq $True) {Write-Output “Path exists on $Computers.”}
Else {Write-Output “Path NOT exist on $Computers.”}
} $Output | Out-File c:\output.txt


Zabbix Appliance 4.4.0 # VMWare

Download a .vmdk of Zabbix appliance. Create the new virtual machine. (For me was necessary to change SCSI type to LSI Logic Parallel instead SAS) 😦

1. Login as a root: appliance/zabbix

2. set static IP:

* cd /etc/network
* sudo vi interfaces (make sure to know, how to move in Vi editor)
* iface ens160 (eth0 or ensX) inet static
   set IP, mask, gateway

* sudo /etc/init.d/networking restart

Check IP:

* ifconfig -a

3. http://ipaddress/zabbix

login: Admin/zabbix

A. create host = server, PC etc. (item = service etc.)

B. add some template (ICMP Ping etc.)

C. create trriger to host or item

D. create an Action (alert e-mail or sms)

Anyway follow the offical Zabbix Documentation 4.4.





Change Active Directory Group type

Modify Active Directory Group type from Global Security do Domain Local etc.



Get-ADGroup -Filter ‘GroupCategory -eq “Security” -and GroupScope -eq “Global”‘ -SearchBase ‘OU=groups,Ou=domain,DC=domain,DC=local’ | Set-ADGroup -GroupScope Universal




Get-ADGroup -Filter ‘GroupCategory -eq “Security” -and GroupScope -eq “Universal”‘ -SearchBase ‘OU=groups,OU=domain,DC=domain,DC=local’ | Set-ADGroup -GroupScope Domainlocal




Get PC from AD which are not renamed

PowerShell Script which find PC with wrong name.  Default name MiniNT etc.


$body = Get-ADComputer -Filter “Name -like ‘minint*'” -SearchBase ‘OU=Desktop,OU=Computers,OU=company,DC=company,DC=local’
If ($body -ne $Null) {
$emailFrom = “”
$emailTo = “”
$subject = “Wrong name PC in Active Directory”
$body = $body
$smtpServer = “”
$smtp = new-object Net.Mail.SmtpClient($smtpServer)
$smtp.Send($emailFrom, $emailTo, $subject, $body)