expand power-shell script knowledge


hi want expand power-shell knowledge:
have created 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 add below queries in script good, please help

example:-

1.how write call function script, 
2.if function ok success mesaage should shown or else shown failed 
3.if function successful message should shown u want export (y/n), if yes call export function..etc..
if add stuff in script more happy...thank you

what question?  cannot design , build custom scripts you.  need ask question.

start here: https://technet.microsoft.com/en-us/scriptcenter/dd793612.aspx?f=255&mspperror=-2147217396


\_(ツ)_/



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

some help on Event 540

WMI Repository 4GB limit - Win 2003 Ent Question

Event ID 1302 (error 1307) DFS replication service encountered an error while writing to the debug log file