Sharepoint integrated reporting services with SQL Always on availability group

It happened once that i needed to provision a Sharepoint 2013 farm including MS SQL Server Reporting Services (SRSS). I had some issues – maybe you found this post ‘cos of that – which i would also share and give a hint on the solution.

Continue reading “Sharepoint integrated reporting services with SQL Always on availability group”

Advertisements

Check OCS/Lync enabled AD user with PowerShell

The security is important; working for a huge company sometimes causes problems. You get less right, because of the security. If you a normal user, and you would like to check if one of the user enabled for OCS without Admin rights or Universal Server Administrator right. A normal domain user can check it, because the AD readable for all AD users.

Continue reading “Check OCS/Lync enabled AD user with PowerShell”

Filedialog and Powershell

Filedialog and Powershell

When I ask any input from a user in Powershell script most of the time I ask it in a parameter of the script body or just prompt for it during runtime. But with the underlying .NET Framework you can take advantage of the GUI, for example using a dialog panel. By using a dialog to specify a file you can be sure, that there is no spelling mistake in the path and you also provide a better user experience.

Open a file...
Open a file…

Continue reading “Filedialog and Powershell”

Powershell – Send mail with attachment

That’s a simple one but good to have

$file = “MYFILE.TXT”
$smtpServer = “MYSMTPSERVER.EMAIL.CO.UK”
$msg = new-object Net.Mail.MailMessage
$att = new-object Net.Mail.Attachment($file)
$smtp = new-object Net.Mail.SmtpClient($smtpServer)

$msg.From = “FROMME@EMAIL.CO.UK”     #reply-to-address
$msg.Sender = “Csoma Ádám”                 #From field
$msg.To.Add(“TOME@EMAIL.CO.UK“)        #send-to part
$msg.Subject = “MY SUBJECT”
$msg.Body = “MY TEXT FOR THE EMAIL”
$msg.Attachments.Add($att)

 

# To authentaicate at the mail server you need to use the next line

# $smtp.Credentials =[System.Net.CredentialCache]::DefaultCredentials

 

$smtp.Send($msg)

$att.Dispose()

PowerShell – get data from xls

This is not a fairy tale at all 🙂 just think on the regional settings…

Issue: Get data from a cell

First of all for this exmample an excel application should be installed to the machine. So here are some lines to get the data from a sheet (A1 cell)

Continue reading “PowerShell – get data from xls”

Get the selected values from a multiselect field via PowerShell

Another quest in Sharepoint automatization is to get the selected values for a given multiselect field. We could start in the usual way as to get the given item from the list then check the field value.

Continue reading “Get the selected values from a multiselect field via PowerShell”

Powershell and the Applications and Services Logs

I would like to show how-to work with events under Applications and Services Logs using Powershell. For this, my examples use IIS Logging and tracing events. You can find out more in this article: http://blogs.iis.net/webtopics/archive/2010/03/19/iis-7-5-how-to-enable-iis-configuration-auditing.aspx

Sometimes I have to work with event logs under the Applications and Services Logs folder, which stores logfiles grouped by particular component of the system. By default it contains 4 categories with 4 logs:

  • Administrative
  • Operational
  • Analytic
  • Debug

Continue reading “Powershell and the Applications and Services Logs”