Skip to main content

Posts

Showing posts from August, 2015

I'm blown away by this command, get calendar appointments from Office 365 using REST

Invoke-RestMethod -Uri "https://outlook.office365.com/api/v1.0/me/calendarview?startDateTime=$(Get-Date)&endDateTime=$((Get-Date).AddDays(7))" -Credential $o365cred |  ForEach-Object { $_.value } |  Select-Object -Property Subject, Start , End It returns the date in universal time format, ie:  2015-08-27T00:00:00Z However, it also includes the time zone and any language should be able to convert the time directly into local time

Tip to create an underline on a heading shorter than the heading itself

You can use a pseudo element with :before (or :after ): h1 { font - weight : 300 ; display : inline - block ; padding - bottom : 5px ; position : relative ; } h1 : before { content : "" ; position : absolute ; width : 50 %; height : 1px ; bottom : 0 ; left : 25 %; border - bottom : 1px solid red ; } http://jsfiddle.net/9e27b/ This is another solution that centers the heading, the problem here is that the underline gets shorter as the column gets shorter. h2 {   display: inline-block;   padding-bottom: 15px;   position: relative;   width: 100% ;   text-align: center; } h2:before{     content: "";     position: absolute;     width: 8%;     height: 1px;     bottom: 0;     left: 46%;     border-bottom: 1px solid red; }

squarespace

Questions How do I or can I convert a page to an index ? It appears that styles are applied to text, but it is not clear how these styles are actually activated.  eg, sometimes text appears large or with borders, but the edit box gives no real indication that this is happening. How do I create hero bars and sliders ? How are images licensed, is there really stock images that can be used ? Squarespace galleries don't seem to want to sit within an index- you can only add pages to an index. How do you add a background image for a page When doing testing thursday night, 20/8, it appeared that additional pages had a left hand side menu, that isn't going to work for me.  Events, I need to test that out. Notes An index contains pages in one long view Q's for 8sw The footer background on the home page is black, do you really want it black ?, I used #ada1ab (a slightly red grey)  Tell Ness wwe wont need the developer edition. I seem to be achieving everythign I n

Outlook - POwerShell - Getting message headers

# Get Internet headers from MailItem in PowerShell Add-type -assembly "Microsoft.Office.Interop.Outlook" | out-null $OutlookApp = new-object -comobject outlook.application $MAPI = $OutlookApp.GetNamespace("MAPI") $Message = $MAPI.GetDefaultFolder([Microsoft.Office.Interop.Outlook.OlDefaultFolders]::olFolderInbox).Items.GetLast() $Message.PropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x007D001E") $OutlookApp.Quit()   More information here   https://msdn.microsoft.com/en-us/library/bb176395%28v=office.12%29.aspx  

Great Article on using powershell to extract information about Outlook Items

https://gallery.technet.microsoft.com/scriptcenter/af63364d-8b04-473f-9a98-b5ab37e6b024 To get a list of all the recipients of a message, you could type something like $folder.items | Select Recipients -First 1 | foreach {$_.Recipients} | Select Address, Name # -----------------------------------------------------------------------------   # Script: Get-OutlookInbox.ps1   # Author: ed wilson, msft   # Date: 05/10/2011 08:34:36   # Keywords: Microsoft Outlook, Office   # comments:   # reference to HSG-1-29-09, HSG-5-24-11   # HSG-5-25-11   # -----------------------------------------------------------------------------   Function  Get - OutlookInBox  {     <#     .Synopsis      This function returns InBox items from default Outlook profile     .Description      This function returns InBox items from default Outlook profile. It      uses the Outlook interop assembly to use the olFolderInBox enumeration.      It creates a custom object consisting of Subject, ReceivedTime, Import

Set permissions in a directory using powershell and a CSV file

import-csv "C:\useraccounts.csv" | ForEach-Object {    $directory = "D:\Personal\" + $_.SAM    $domainAccount = "COMP\" + $_.SAM    $rule=new-object System.Security.AccessControl.FileSystemAccessRule( $domainAccount ,"FullControl","Allow")   $acl=get-acl $directory   #Add this access rule to the ACL   $acl.SetAccessRule($rule)     #Write the changes to the object   set-acl $directory $acl } This however, wont set permissions recursively,  you'll need something like this from technet.  Notice the "for each file" https://technet.microsoft.com/en-us/magazine/2008.02.powershell.aspx #ChangeACL.ps1 $Right="FullControl" #The possible values for Rights are # ListDirectory, ReadData, WriteData # CreateFiles, CreateDirectories, AppendData # ReadExtendedAttributes, WriteExtendedAttributes, Traverse # ExecuteFile, DeleteSubdirectoriesAndFiles, ReadAttributes # WriteAttributes, Write, Delete # ReadPermissions, R

Get permissions for a directory using powershell

 get-acl .\directoryname | format-list   Results looks something like Path   : Microsoft.PowerShell.Core\FileSystem::D:\Personal\ directoryname  Owner  : BUILTIN\Administrators Group  : IAENG\Domain Users Access : BUILTIN\Administrators Allow  268435456          BUILTIN\Administrators Allow  FullControl          NT AUTHORITY\SYSTEM Allow  FullControl          BUILTIN\Administrators Allow  FullControl          COMP\Managers Allow  FullControl Audit  : Sddl   : (a bunch of strange characters)

PowerShell Script to create new ActiveDirectory Users

This assumes you have a CSV file with three columns FirstName,LastName,SAM John,Doe,jdoe The script... import-module activedirectory import-csv "C:\....\useraccounts.csv" | ForEach-Object {   $newUPN = $_.SAM + "@ad.somewhere.com"   New-ADuser -SamAccountName  -GivenName $_.FirstName -Surname $_.LastName -Path "OU=YourCompany,DC=ad,DC=somewhere,DC=com,DC=nz" -Name $fullname  -DisplayName $fullname  -AccountPassword (ConvertTo-SecureString -AsPlainText "P@$$w0rd" -Force)  ## you may also want to set the UserPrincipalName at the same time  ## ie: include it above instead of down here. # set-aduser -identity $_.SAM -UserPrincipalName  $newUPN   }