If you use CentOS and want to add some extra packages you can use EPEL.
Extra Packages for Enterprise Linux is project created by Fedora.
In order to use repositories on CentOS first download and install RPM appropriate for your version of CentOS from here:
- epel-release-latest-5.noarch.rpm – CentOS 5.x
- epel-release-latest-6.noarch.rpm – CentOS 6.x
- epel-release-latest-7.noarch.rpm – CentOS 7.x
Then install it and enjoy more packages from new repo.
[root@localhost ~]# yum install epel-release
Here is example from CenOS 7 how to add EPEL repositories:
Current expectations from all type of systems and services is to be available without any disruption. One of mission critical systems is gateway/firewall. Of course you can use multiple products available on the market. One of them is openSUSE, which is perfect to act as gateway/firewall between Internet and production systems. So, how to provide redundancy for openSUSE and same time be able to keep it up-to-date without any disruption for production systems?
openSUSE 13.2 with keepalived provides all technology required to make your firewall high-available.
Here is diagram of Lab created to configure and test openSUSE with keepalived:
If you want to send email from PowerShell script via Google Mail:
$SMTPServer = "smtp.gmail.com" $SMTPPort = "587" $SMTPUsername = "firstname.lastname@example.org" $SMTPPassword = "password" $EmailSenderAddress = New-Object System.Net.Mail.MailAddress("email@example.com", "PowerShell Automated Email") $EmailFrom = $EmailSenderAddress $EmailTo = "firstname.lastname@example.org" $EmailCc = "email@example.com" $EmailAttachment = "C:\Scripts\Attachment.txt" $EmailSubject = "Automated Email with Report." $EmailBody = @" Please find attached report. "@ $EmailMessage = New-Object System.Net.Mail.MailMessage $EmailMessage.Subject = $EmailSubject $EmailMessage.Body = $EmailBody $EmailMessage.To.Add($EmailTo) $EmailMessage.CC.Add($EmailCc) $EmailMessage.From = $SMTPUsername $EmailMessage.Attachments.Add($EmailAttachment) $SMTPSession = New-Object System.Net.Mail.SmtpClient($SMTPServer, $SMTPPort); $SMTPSession.EnableSSL = $true $SMTPSession.Credentials = New-Object System.Net.NetworkCredential($SMTPUsername, $SMTPPassword); $SMTPSession.Send($EmailMessage) Write-Host "Mail Sent"
Many times there is a need to store password in PowerShell script. Unfortunately to leave password in script is insecure solution and might cause an issue.
So, what to do if there is a need to have password in a script and we don’t want to have it embedded in clear-text in script?
Best way is to encrypt it and store in the file and then re-use it when required.
Create file with encrypted password
$secureString = Read-Host -AsSecureString "Enter a secret password" $secureString | ConvertFrom-SecureString | Out-File C:\Scripts\storedPassword.txt
Use encrypted password in script
$secureString = Get-Content -Path C:\Scripts\storedPassword.txt | ConvertTo-SecureString