Hi I want to expand my power-shell knowledge:
I have created this user-friendly script,
#import
Add-PsSnapin Microsoft.SharePoint.PowerShell
$spWeb=Read-Host "Enter site: "
$web=Get-Spsite $spWeb
$path = Read-Host "Enter Path: "
Import-SPWeb $spWeb -Path $path -UpdateVersions Overwrite
Write-Host "Imported successfully"
I feel if I add below queries in this script will be good, Please help
example:-
1.How to write call function to this script,
2.if function is ok then success mesaage should shown or else shown failed
3.if function is successful message should shown like do u want to export (Y/N), if Yes then call export function..etc..
if you add extra stuff in this script i would be more happy...Thank You