Start Windows CMD window as Admin (Run as).
Then run this command:
Continue reading “Enable icmp reply (ping) in Powershell”
Email Notification for specific Windows Application Event ID
I wanted to get notified for specific Windows Application Event log ID would appears; As unfortunately the Application does have such of feature/mechanism.
Continue reading “Email Notification for specific Windows Application Event ID”
Massive upload files to SharePoint servers
I have been looking to make using some sort of script the way to make massive upload to a sharePoint server;
I have been finding many using Powershell and I came up with this type of script
param ([String]$spPath, [String]$localPath) ################################################################################# ## Load the SharePoint Snapin so the script can be executed from PowerShell editor ## INTERACTIVE OR AUTOMATIC MODE. ## FOR AUTOMATIC MODE. SET THE VARIABLE BELOW.OTHERWISE PROMPT WOULD REQUEST EACH. ## SET THE NUMBER OF TIME YOU WISH UPLOAD FOR EACH FILES ##$t = "10" ### SET THE REMOTE SHAREPOINT REMOTE LOCATION FOR THE SHARED DOCUMENT ### OR LET THE PROMPT ### EX: $spPath = "http://sharepoint/home/Shared%20Documents/" #### SET LOCAL PATH OF FILES TO BE UPLOADED. #### EX: $localPath = "e:\my_files" ################################################################################## Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue # get the SharePoint path if not specified $i = 1 if ($spPath -eq "") { Write-Host $spPath = Read-Host -Prompt " Please enter the full path for the shared librairy?" } if ($t -eq "") { Write-Host $t = Read-Host -Prompt " How Many times you wish to upload?" } # get the local path if not specified if ($localPath -eq "") { Write-Host $localPath = Read-Host -Prompt " Please enter the full path to the local directory that contains the documents to be uploaded" } do {Write-Host $i;$i++ ## Define our library name and web url $LibraryName = $spPath.Substring($spPath.LastIndexOf("/")+1) $webUrl = $spPath.Substring(0,$spPath.LastIndexOf("/")) ## Define a function to return the destination file name Function BuildFileName($filename) { "$webUrl/$LibraryName/" + $(split-path -leaf $filename) } ## Upload all the documents found in the specified location Write-Host "Uploading all documents from $sourceDocs" $webClient = New-Object System.Net.WebClient $webClient.Credentials = [System.Net.CredentialCache]::DefaultCredentials dir $localPath | % { Write-Host "Uploading file from "$localPath": $_" -nonewline $fName = BuildFileName $_ $webClient.UploadFile($fName,"PUT", $_.FullName) Write-Host " done" -ForegroundColor Green } } until ($i -gt $t)
SMTP Banner change on Exchange 2007
Having setup Microsoft Exchange 2007, wanted to make sure that my SMTP banner would reflect my current ‘External’ Domain Name.