>Get-Eventlog -Logname Application | Where-Object {$_.Timegenerated -ge (Get-Date).AddDate(-1)} | Export-Csv Temp.csv -Encoding Unicode
>
[System.IO.File]::ReadAllText("Temp.csv") | Out-File Application_eventlog.csv -Append -Encoding Unicode

 

Import-CalendarCSV -CSVFileName <PATH>\calendar.csv -EmailAddress This email address is being protected from spambots. You need JavaScript enabled to view it.

The CSV needs to be in the format Subject, Start Date, Start Time, End Date, End Time.

 

Switch:

http://technet.microsoft.com/en-us/library/ff730937.aspx

 


$a = 5 switch ($a)     {         1 {"The color is red."}         2 {"The color is blue."}         3 {"The color is green."}         4 {"The color is yellow."}         5 {"The color is orange."}         6 {"The color is purple."}         7 {"The color is pink."}         8 {"The color is brown."}         default {"The color could not be determined."}     }

 

function test ($x, $y) 
    {
        $x * $y 
    }

About Lei

I am an IT specialist with over 10 year experience - years on Automation, on-Premise or Azure.

I am happy to develop however never want be a full time developer. Only do what I have to do. If it has to be PowerShell,HTML, PHP, CSS, C#, VBS or JS, front end or backend, so be it, doesn't matter!

Spent years with Windows, SCCM, SharePoint, SQL and Exchange servers. For last several years, I have been actively working under On Premise > Azure environment.

THERE IS NO WAY BACK!!!

Current Certificates:
    Microsoft® Certified-
  • -Enterprise Administrator
  • -Database Administrator
  • -SharePoint Administrator
  • -Administering and Deploying SCCM 2012
Red Hat Certified Technician
ITIL V3 Foundation - Practitioner

Working on Azure Certificates now and hopefully they can stop upgrading their questions one day! GIVE ME A BREAK!

Contact Lei

Name *
Email *
Comments *

Traffic since 10/08/2016

Today45
Yesterday83
This week669
This month1965
Total416325

Visitor Info

  • IP: 54.163.210.170
  • Browser: Unknown
  • Browser Version:
  • Operating System: Unknown

Who Is Online

2
Online

2017-12-17

Login