This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $time = (Get-Date).Adddays(-(90)) | |
| Get-ADUser -SearchBase "ou=terminated users,dc=contoso,dc=ads" -Filter {LastLogonTimeStamp -lt $time -and enabled -eq $false} | foreach {Get-Mailbox $_.name} | foreach {New-MailboxExportRequest -Mailbox $_ -FilePath "\\SERVERINO\backup\$($_.Alias).pst"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| parse.pl: | |
| ---- | |
| while (<>) { | |
| $_ =~ s/\[\s+\d\]//g; | |
| $_ =~ s/\s+/,/g ; | |
| $_ =~ s/^,|,$//g; | |
| print split(/\n/,$_); | |
| print "\n"; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 14 | |
| $registryPath = "HKCU:\Software\Microsoft\Office\15.0\Common\MailSettings" | |
| IF(Test-Path $registryPath){ | |
| New-ItemProperty -Path $registryPath -Name "NewSignature" -Value "medium" -PropertyType String -Force | Out-Null | |
| } | |
| # 15 | |
| $registryPath = "HKCU:\Software\Microsoft\Office\15.0\Common\MailSettings" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 14 | |
| $registryPath = "HKCU:\Software\Microsoft\Office\14.0\Common\MailSettings" | |
| IF(Test-Path $registryPath){ | |
| New-ItemProperty -Path $registryPath -Name "NewSignature" -Value "medium" -PropertyType String -Force | Out-Null | |
| } | |
| # 15 | |
| $registryPath = "HKCU:\Software\Microsoft\Office\15.0\Common\MailSettings" | |
| IF(Test-Path $registryPath){ | |
| New-ItemProperty -Path $registryPath -Name "NewSignature" -Value "medium" -PropertyType String -Force | Out-Null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #time, sourceip, destinationip, packet length, sourceport, destinationport | |
| while(<>){ | |
| s/\"//g; | |
| @i = split(','); | |
| $j = join(",",($i[1] , $i[2], $i[3], $i[5], $i[length(@i)-1], $i[length(@i)-2])); | |
| next unless $j =~ m/^[0-9.]+,[0-9.]+,[0-9.]+,[0-9]+,[0-9]+,[0-9]+/; | |
| print $j; | |
| #print "\n"; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT | |
| CASE WHEN sdo.NAME IS NULL THEN sdo2.Name ELSE sdo.NAME END "Site", | |
| COALESCE(wtk.WORKORDERID , wo.workorderid) "Ticket Number", | |
| CASE WHEN to_timestamp(MAX(wo.createdtime)/1000)::DATE IS NULL THEN to_timestamp(MAX(wo2.createdtime)/1000)::DATE ELSE to_timestamp(MAX(wo.createdtime)/1000)::DATE END"Request Created Date", | |
| to_timestamp(MAX(ct.createdtime)/1000)::TIMESTAMP "Time Spent Created Time", | |
| rctd.FIRST_NAME "Time Spent Technician", | |
| CAST(SUM(ct.TIMESPENT) AS FLOAT)/1000/3600 "Time Spent", | |
| CASE WHEN MAX(tk.TASKID) IS NOT NULL THEN MAX(wo2.TITLE) ELSE MAX(wo.TITLE) END "Title", | |
| ct.DESCRIPTION FROM ChargesTable ct | |
| LEFT JOIN WorkOrderToCharge wotoc ON ct.CHARGEID=wotoc.CHARGEID |
OlderNewer