automated environment you would want to put this into a .ps1 script that accepts parameters (seeherefor an example). However, you may find the method below good for learning and experimenting. Replace all the “
PowerShell <#.SYNOPSISThis script uninstalls the Teams app and removes the Teams directory for a user..DESCRIPTIONUse this script to remove and clear the Teams app from a computer. Run this PowerShell script for each user profile in which Teams was installed on the computer. After you run ...
Backup and Restore is critical to operate real world systems. In this article I will walk you through the process to backup and restore Windows Server system disk from a VM running in the Windows Azure IaaS environment using PowerShell. Follow these instructions to backup and restore Windows Ser...
(e, "Host.ReportException", ErrorCategory.NotSpecified, null); } lock (this.instanceLock) { this.currentPowerShell = PowerShell.Create(); } this.currentPowerShell.Runspace = this.myRunSpace; try { this.currentPowerShell.AddScript("$input").AddCommand("Out-String"); // Do not merge ...
Sample script PowerShellCopy # Variables for common values$rgName='MyResourceGroup'$location='eastus'# Create user object$cred=Get-Credential-Message'Enter a username and password for the virtual machine.'# Create a resource group.New-AzResourceGroup-Name$rgName-Location...
PowerShell Script Sample: Backup & Restore on Windows Azure Iaas Backup and Restore is critical to operate real world systems. In this article I will walk you through the process to backup and restore Windows Server system disk from a VM running in the…...
From where you extracted the files, Import the module into your PowerShell SessionNote:Please do not use the ISE to run this sample Import-module.\IdentityProtectionTools.psd1 Running the sample Connect to the MS Graph endpoint with the proper permission scopes. ...
This section provides a sample Windows PowerShell script, AddCacheHost.ps1. This script automates the steps that are required to add a cache host to a cache cluster. For an explanation of the commands that are used in this script, see Automated Installation and Configuration. The AddCache...
Sample: RemoveCacheHost Script To use the RemoveCacheHost script, first copy the contents of the following Windows PowerShell script to a text file, and save the file as RemoveCacheHost.ps1. Then review the information following the script to understand how to customize and run the script. ...
Please do not modify or change any preset parameters. Please note that we will not be able to support the script if it's changed or altered in any way or used in a different situation for other means. This code-sample is provided "AS IS" without warranty of a...