UpdateLocalModule.ps1


#update temp folder to PS location for publishing to PS Gallery
#Copy-Item 'C:\temp\Exchange_AddIn\Exchange_AddIn.psd1' -Destination 'C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Exchange_AddIn'
#Copy-Item 'C:\temp\Exchange_AddIn\Exchange_AddIn.psm1' -Destination 'C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Exchange_AddIn'


#Copy-Item 'C:\temp\Exchange_AddIn\Exchange_AddIn.psd1' -Destination 'C:\Users\mconeill\Documents\PowerShell\Modules\Exchange_AddIn'
#Copy-Item 'C:\temp\Exchange_AddIn\Exchange_AddIn.psm1' -Destination 'C:\Users\mconeill\Documents\PowerShell\Modules\Exchange_AddIn'

#Copy-Item 'C:\temp\Exchange_AddIn\Exchange_AddIn.psd1' -Destination 'C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Exchange_AddIn'
#Copy-Item 'C:\temp\Exchange_AddIn\Exchange_AddIn.psm1' -Destination 'C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Exchange_AddIn'
Copy-Item 'C:\Users\mconeill\Documents\GitHub\Exchange_AddIn\Exchange_AddIn.psd1' -Destination 'C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Exchange_AddIn'
Copy-Item 'C:\Users\mconeill\Documents\GitHub\Exchange_AddIn\Exchange_AddIn.psm1' -Destination 'C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Exchange_AddIn'

Start-Process explorer.exe 'C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Exchange_AddIn'

#update PowerShellGallery run on Windows PS
#Publish-Module -Name Exchange_AddIn -NuGetApiKey oy2e4dotoj47oxoey4hacqkg7cbuwriuzj3si7ms5cwd4i
Publish-Module -Path 'C:\Users\mconeill\Documents\GitHub\Exchange_AddIn\' -NuGetApiKey oy2e4dotoj47oxoey4hacqkg7cbuwriuzj3si7ms5cwd4i 

#mconeill@microsoft.com is account
Start-Process https://powershellgallery.com #to update/edit package downloads

#run platyps for creating docs
New-MarkdownHelp -Module Exchange_AddIn -OutputFolder .\docs

Install-Module -Name Exchange_AddIn -Force -AllowClobber

<#update MS Script Center
Compress-Archive -Path 'C:\Windows\System32\WindowsPowerShell\v1.0\Modules\Exchange_AddIn' -DestinationPath c:\temp\Exchange_AddIn.zip
 
Start-Process https://gallery.technet.microsoft.com/scriptcenter/ #to update .zip file for MO_Module
#>