Windows PowerShell Index -contains operator vs .contains() method -ea operator -ErrorAction:SilentlyContinue parameter is not being respected & $error variable not updated -ExpandProperty & Export CSV !!! power
Hyper-V Shared Nothing Live Migration, Hyper-V Live Storage Migration, Hyper-V Replica and the new native support for Hyper-V in PowerShell. I did show some other new features like Live Snapshot Merge but the main session focused on these topics. ...
Features like this can increase the exposure of a network to attack vectors, so take precautionary steps to prevent or mitigate such attacks. PowerShell’s scripting and automation capabilities can assist in this. Following Microsoft’s purchase of Github in June 2018, PowerShell users now have a...
PowerShell provides a large set of commands with which you can automate your tasks, like user management, CI/CD, managing cloud resources and much more. There's also testing capabilities via Pester and third-party modules you can install on your system, to extend your list of commands. Engli...
I place all scripts in c:\admin\scripts. Lastly, a scheduled task must to be setup. Create a task that runs as the user created earlier. I set the task to run every 5 minutes, but this can be adjusted per your needs. The program to run is PowerShell and the argument is the ...
In this section, you use Visual Studio Code to create a local Azure Functions project in PowerShell. Later in this article, you'll publish your function code to Azure. In Visual Studio Code, press F1 to open the command palette and search for and run the command Azure Functions: Create ...
The final PowerShell script will look like below: Copy $path='C:\Data.xml'$ManagementServer='NewManagementServer'$SQLServer='NewSQLServer'$SQLAdmin='Domain\NewSQlAdmin'$DNSServerVMName='NewDNSServer'$xml= [xml](Get-Content$path)$node=$xml.Data.Roles.Role |where{$_.Name-eq'ManagementServer...
Lesson Learned #365: TSQL Execution Client Statistics using PowerShell We have an interesting service request where our customer needs to measure the network time spent in several interactions while executing a query. Following I would like to share the following scrip......
PowerShell FunctionMyFunction ($param) {#work} The second, and more preferred way is like this: PowerShell FunctionMyFunction {param( [int]$x=7, [int]$y=9)#work} Since PowerShell is an interpreted language, functions must be placed in the script before they’re called in the main par...
So your normal method of managing Exchange in Office 365 might be something like this: $UserCredential = Get-Credential $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -Allo...