FIX: Please set stopOnMultipleConnections to false in public settings

I had played around with the Update management solution in Azure in my developer tenant. Everything worked alright, so I thought lets push this for a new customer with 10 Virtual Machines in Azure.

Pushing the agents in Azure Automation gave the error below.

By clicking the error I got a more detailed error message:

VM has reported a failure when processing extension ‘MicrosoftMonitoringAgent’. Error message: “This machine is already connected to another Log Analytics workspace, or managed by System Center Operations Manager. Please set stopOnMultipleConnections to false in public settings or remove this property, so this machine can connect to new workspaces. Note that this machine may be billed multiple times for each workspace it report to.” 

This machine is already connected to another Log Analytics workspace, or managed by System Center Operations Manager. Please set stopOnMultipleConnections to false in public settings or remove this property, so this machine can connect to new workspaces
Don’t copy the error message. It looks ridiculously bad.

The error message was clear for me. We use SCOM to monitor the servers. I couldn’t update the monitoring agents because the SCOM agent was already installed. Although the error message was clear, I wasn’t sure how to do that. Took me awhile to figure out and that’s why I made a tutorial.

Before you start with the tutorial, keep in mind what the setting does. It’s possible that the agent will communicate with two OMS workspaces and you’ll have to pay double for the VMs.

Method: set stopOnMultipleConnections to false in public settings

Log in to portal.azure.com and open the Microsoft Operation Management Suite (OMS).

  1. Click the gearwheel in the top-right cornor
  2. Open Connected Sources 
  3. Click Windows servers
  4. Copy the workspace ID and Primary Key

The trick here is that we’ll have to deploy the Monitoring Agent  with PowerShell.

Open PowerShell_ISE  (Control + R > Powershell_ISE)

Log on to Azure

Login-azurermaccount

Select the correct subscription

select-azurermsubscription -subscriptionid YOURSUBSCRIPTIONID

Now copy/paste the following script, but change the settings to your own settings.

  • WorkspaceId
  • WorkspaceKey
  • My location is West Europe, yours can be different.

You’ve already copied them from a previous step.

Beware! This script will install the extension for all virtual machines in your tenant.
If that’s not what your want, copy the script between the foreach loop {} and set the VM and ResourceGroupName yourself.

$vms = get-azurermvm

$PublicSettings = @{"workspaceId" = "WORKSPACEIDHERE";"stopOnMultipleConnections" = $false}

$ProtectedSettings = @{"workspaceKey" = "WORKSPACEKEYHERE"}

foreach ($vm in $vms){

write-output$vm.name

Set-AzureRmVMExtension -ExtensionName "Microsoft.EnterpriseCloud.Monitoring" `

-ResourceGroupName $vm.resourcegroupname`

-VMName $vm.name`

-Publisher "Microsoft.EnterpriseCloud.Monitoring"`

-ExtensionType "MicrosoftMonitoringAgent"`

-TypeHandlerVersion 1.0`

-Settings $PublicSettings`

-ProtectedSettings $ProtectedSettings`

-Location 'West Europe'

}
We’ll set the StopOnMultipleConnections to false in the PublicSettings.
If you run this script:
get-AzureRmVMExtension-VMName VMNAME-ResourceGroupName RESOURCEGROUPNAME -Name "Microsoft.EnterpriseCloud.Monitoring"
It will show that the settings are correct.
.

FIX: Scheduled Task launch Failure error 2147943726

This is a short fix for when your Scheduled Tasks do not run and throw an error Task Category “Task Start Failed” Operational Code “Launch Failure“.

I won’t be going to deep in to this. Your task is probably failing because another “instance” is still running although you don’t see that in the GUI.

Method 3 – Failure launch 2147943726

One of the common reasons your tasks failed is because the username/password that’s was being used after the task creation probably changed or have an outdated password.

  1. Right click your Task.
  2. Go to Properties.
  3. Select the general tab.
  4. Click Change User or Group..
  5. Enter the username you want the task to use.
  6. Give in your credentials.

Verify everything works by running the task.

Method 2 – Scheduled Task launch Failure error 2147943726

  1. Right click the Task that’s failing.
  2. Click Properties.
  3. Go to the Settings tab.
  4. Below in the Settings tab is a drop-down menu open that.
  5. Choose Stop the existing instance.Your task should run again now.

FIX: Joining Azure AD Domain services incorrect password

Azure Active Directory Domain Services is one of the new products that Microsoft Azure offers. If you deploy Azure AD Domain Services, you do not need Domain Controllers anymore. This is not a sales blog post, so if you want to read more about it click here.

I deployed Azure AD Domain Services in a new test environment and wanted to link a VM to it. I followed the steps Microsoft provided, but I ran into a problem while joining the domain. In the blog, Microsoft says that you should use the UPN instead of the old school “domain\username”. Only I got a

“the user name or password is incorrect”

Joining Azure AD Domain services incorrect password
Joining Azure AD Domain services incorrect password

It took a while, but even if you do not have a single domain controller in your domain, you can still use the old school way.

Microsoft gives a tip on their blog to use the UPN format:

We recommend using the UPN format to specify credentials.

If a user’s UPN prefix is overly long (for example, joehasareallylongname), the SAMAccountName might be auto-generated. If multiple users have the same UPN prefix (for example, bob) in your Azure AD tenant, their SAMAccountName format might be auto-generated by the service. In these cases, the UPN format can be used reliably to log on to the domain.

Well don’t use the UPN format. I had to use the domain\USERNAME format even for an Azure AD environment only.

baswijdenesoutlook026.onmicrosoft.com\USERNAME

FIX: WslRegisterDistribution failed with error: 0x80070057 Kali

Since a few days i’m getting this error in Kali:

Installing, this may take a few minutes…
WslRegisterDistribution failed with error: 0x80070057
Error: 0x80070057 The parameter is incorrect.

Method 1 is a work around.
Method 2 fixes your issue.

Method 1

Start Command Prompt

Type or copy each line separately

wslconfig.exe /setdefault kali-rolling
bash
cd

From now on you can start Kali in Command Prompt

Method 2

Go to  C:\Users\%username%\AppData\Local\Packages\KaliLinux<randomchars>\LocalState\rootfs.
Copy the rootfs folder to a different folder  (C:\temp\).
Reset the Kali app.
Launch Kali and wait till it’s installed.
Delete the newly installed rootfs and move the old one back.
You can now use Kali with everything unchanged.

 

 

FIX: Program can’t start because it is missing MSVCR71.dll

Program can’t start because it is missing MSVCR71.dll

For if you’re a sysadmin, Adam the Automator created a great function to use as well.

Programs often use certain .DLL files. These files can get corrupted and your program can be unresponsive. By repairing or even replacing the .DLL you can fix the problem.

The tutorial below is not only for MSVCR71.DLL, but can be used for other .DLL files as well.  Below is a short guide only this time since it’s only a few commands you’ll have to run on your device. The screenshots of CMD will help you further. If you got here due to a different .DLL file, make sure to change the file-name in the tutorial.

Goodluck!

Short guide – Program can’t start because it is missing MSVCR71.dll

  1. Open the Explorer.
  2. Go to C:\Windows\System32 (you can also copy/paste this).
  3. Search for MSVCR71.DLL and make a copy.
    You can either search function and type in MSVCR71.DLL or alternatively write the first few letters and it will find the MSVCR71.DLL automatically.
  4. Open Start and search for CMD, right click CMD and click Run as administrator.
  5. Type in: Regsvr32.exe msvcr71.dll (you can also copy/paste this).
  6. Press Enter.
Program can't start because it is missing MSVCR71.dll
Program can’t start because it is missing MSVCR71.dll

If the MSVCR71.DLL is not there, download it from the internet and place it in C:\Windows\System32.

If that didn’t solve your problem, last resort is to scan your system with System File Checker (SFC).

SFC is used to detect and fix problems with your system. This will run a check on corrupt files and replace these.

  1. Open Start and search for CMD, right click CMD and click Run as administrator.
  2. Type: sfc /scannow (You can also copy paste)
  3. Press Enter.
Program can't start because it is missing MSVCR71.dll
Program can’t start because it is missing MSVCR71.dll

The scan will take awhile. Wait it out and test it again.

FIX: Error code 0x803F8001 Windows Store

Error code 0x803F8001 is more common in the Windows store. You can see the error in different pop-ups and forms, so if my screenshot of the error message below does not match yours, then it is possible that one of the steps below will still solve the problem for you.

0x803F8001
0x803F8001

First solution – Error code 0x803F8001 Windows Store

By re-configuring the Windows Store app you’ll basically ‘reset’ the app.

  1. Go to Start and search for PowerShell
  2. Right click PowerShell and click Run as Administrator
  3. Type, or copy this command:
    Add-AppxPackage -DisableDevelopmentMode -Register $Env:SystemRoot\WinStore\AppxManifest.xml

Go check out if that fixed your issue. Otherwise continue with solution two.

Second solution – Error code 0x803F8001 Windows Store

The Windows Store cache can cause problems.  You can reset this with an application.

  1. Go to Start
  2. Type in WSreset.exe
  3. Run the Application
0x803F8001
0x803F8001

Third solution – Error code 0x803F8001 Windows Store

Are your Date & timezone correct? If not, then this can be your solution.

Go to start and click on the Settings button0x803F8001

Search for Time Zone0x803F8001Check if the time and  time zone are correct

0x803F8001

Work Around

Most of the times solution one will solve your problem. And otherwise solution two does. Though, if this didn’t solve the problem for you there is a little work-around. If you want to open the Windows Store or Windows Store apps open it as Administrator.

  1. right click the Windows Store or Windows Store App.
  2. Click Run as Administrator.

FIX: Skype delegates Outlook meetings V2

As a follow up on my last post. It’s also possible that a corrupt permission is blocking the Skype permission. this can be fixed easily with a PowerShell script. 

The solution below is also for error message:
“You do not have permission to schedule Skype meetings on behalf of the owner”

Here is a quick resolution:

Install Microsoft Exchange Web Services Managed API 2.2 using this link: http://www.microsoft.com/en-us/download/confirmation.aspx?id=42951 

  1. Open the Office 365 portal with Admin credentials and access: Exchange admin center – Permissions, select Organization Management and add the role: ApplicationImpersonation.
  2. Open Powershell, connect to exchange online and run the following commands:
$O365Cred = Get-Credential -credential admin@mail.com 

Please replace admin@mail.com with the admin credentials.

Click Enter – Prompt appears to add the admin password

  1. http://blogs.msdn.com/b/emeamsgdev/archive/2014/05/16/powershell-clean-mailbox-delegates-update.aspx

Save Reset-Delegates.ps1 on the computer and run the next powershell command but with powershell pointed to the location where the ps1 is saved.

So when you save it on the desktop

Use this in Powershell: CD C:\users\%username%\desktop

  1. Run the next command:
.\Reset-Delegates.ps1 user@mail.com -PurgeInvalidFreeBusy -impersonate -EWSURL "https://outlook.office365.com/EWS/Exchange.asmx" -Username

$O365Cred.Username -Password $O365Cred.GetNetworkCredential().Password

Replace user@mail.com with the affected user email address.

FIX: Skype delegates Outlook meetings

EDIT: Your problem can also be caused by a corrupt permission. See blog post V2.

Summary

We have many customers who use Outlook and Skype for business. The secretaries make appointments for the CEO’s or other users . One problem is, is that Skype delegates are not very stable.

My colleague Lennard and I have often been in contact with Microsoft engineers over this.

I almost dare to say that we are experts in Outlook Skype delegates. I do not, because who knows, someone will come up with a question that I have no answer to 😉.

From all these ‘Skype meetings’ with Microsoft, we’ve come up with a nice list with what the Skype permissions can break, but also what is needed before the delegate is added to Skype.

I wrote the tutorial in 3 parts.

  1. What can break Skype permissions for delegates in Outlook?
  2. How do you assign Skype delegates in Outlook correctly?
  3. How do I fix broken permissions for skype meetings in Outlook?

If you use Outlook 2016, directly scroll down because it lacks a function that is needed for Skype delegations.

The most common error message:

“You do not have permission to schedule Skype meetings on behalf of the owner”

What can break Skype permissions for delegates in Outlook?

  • Both users need to be logged on Skype for business at the same time.
  • Both the delegater and delegate need to run the same Skype client version.
    Click small arrow next to settings > help > about skype for business to see the S4B version.
  • Always use the full client. If someone logs on the basic client for one or two seconds the delegates can break.The outlook profile for the delegater needs to be the default profile.
  • It doesn’t always work with Outlook cache mode on. Turning it off sometimes work.
  • Skype needs to have MAPI and EWS available to access outlook. You can check this by ctrl + right click the Skype icon and search for MAPI. If that isn’t available your delegates will be removed.
  • Only one session per delegater should be active on either Outlook, Skype or both.
  • Opening another mailbox in OWA (delegator mailbox) can also break the settings.
  • Opening another mailbox in Outlook (delegator mailbox) can also break the settings. This does not count for full access rights with automapping.
  • If the MAPI or EWS says unavailable it’s probably because you’re using skype/outlook 2016. The link between Skype and Outlook 2016 does not work Properly. See the tutorial to fix this issue.
  • A delegate can have up to 2 delegators when using Skype for Business MSI version.

How do you assign Skype delegates in Outlook correctly?

Here is an example to assign Skype Permissions in Outlook:

CEO: Bas.wijdenes@contoso.com
Secretary: Kim.Holland@contoso.com

Bas Wijdenes will be de delegater and Kim Holland will be the delegate.

  1. Are there any permissions already set for the delegater? This could cause issues. If it isn’t too much of a hassle, remove these from the permissions list in Exchange Online.
  2. Start Outlook and make bas.wijdenes@contoso.com the default profile in Outlook. This is important, otherwise your skype delegates wont work.
  3. Start Outlook and Skype. Make sure both EWS and MAPI are Status OK in Skype. (shift + Right click skype icon > configuration information > Scroll down to EWS and MAPI).
  4. Add Kim.Holland@contoso.com as a delegate in Bas.wijdenes@contoso.com’s Outlook.

    Skype delegate in Outlook
    Skype delegate in Outlook
  5. Wait 2 minutes then sign out from Skype, completely remove your credentials, wait 2 minutes again, then log back in to Skype and…. wait 2 minutes again.
  6. You should see a group called Delegates in Skype for business now
    (In Lync for Bas.wijdenes@contoso.com)
  7. The delegate, Kim Holland should also see a group in Skype after re-starting Skype.

How do I fix broken permissions for skype meetings in Outlook?

There are a few settings which you must meet before it works.
  • The outlook profile(delegater) needs to be the default profile.
  • Make sure to use Exchange Online (Cached modus off)
  • You can only add users as a delegate in outlook. They also need to be logged on to skype at the same time. Groups don’t work for skype delegates since they don’t have a SIP.
  • Make sure that Skype for Business is the full client in the Microsoft Office pack!
  • If you’re using Outlook 2016 follow the instructions below.

It can take up to 24h before it starts working, yet most of the time this is between 2-5 minutes.

easy fix – You do not have permission to schedule Skype meetings on behalf of the owner

To fix this problem automatically, click the Download button. In the File Download dialog box, click Run or Open, and then follow the steps in the easy fix wizard.

Download

  • This wizard may be in English only. However, the automatic fix also works for other language versions of Windows.
  • If you’re not on the computer that has the problem, save the easy fix solution to a flash drive or a CD, and then run it on the computer that has the problem.

To run the easy fix, you will need to enter the Legacy Exchange DN of your Exchange account.

To get the Legacy Exchange DN, follow these steps:

You do not have permission to schedule Skype meetings on behalf of the owner.
You do not have permission to schedule Skype meetings on behalf of the owner.

1. Hold down the Ctrl key and right-click the Outlook system tray icon
2. select Test E-mail AutoConfiguration.

The Test Email AutoConfiguration box will pop up.
1. Add your Email Address + Password
2. Clear “Use Guessmart” checkbox
3. Clear “Secure Guessmart Authentication” checkbox
4. Click Test
5. Open tab XML
6. Copy the LegacyDN
7. Copy the LegacyDN to the EasyFIX

Make sure to copy everythign between the <LegacyDN> tags.
In the example it will be:
/o=ExchangeLabs/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=77fdf4feb9e247059b8a6724eb2588da-Bas Wijdene.

You do not have permission to schedule Skype meetings on behalf of the owner
You do not have permission to schedule Skype meetings on behalf of the owner

Now restart Outlook and Skype for business and wait 3-5 minutes to see the delegates in Skype.

MANUAL FIX – You do not have permission to schedule Skype meetings on behalf of the owner

  1. Start Registry Editor. Type regedit.exe at the Start screen, and then click regedit in the search results.
    If you are prompted for an administrator password or for confirmation, type the password, or click Allow.
  2. Navigate to the following location in the registry:

KEY_CURRENT_USER\Software\Microsoft\Office\16.0\Outlook\Profiles

  1. Under this key, locate the name of your Outlook profile, and expand it (by default the profile name is “Outlook,” but it can be whatever you named your profile if you created it manually).
  2. Under the profile, locate the 9375CFF0413111d3B88A00104B2A6676 key, and then expand it.
  3. Under 9375CFF0413111d3B88A00104B2A6676 key, you’ll have a subkey for each account in your profile. Select the first subfolder (00000001), and then examine the data of the Account Name binary value by double-clicking the value. Repeat this process until you find the Account Name value that includes your SMTP address.
  4. Under the \0000000x subkey that includes your SMTP address, locate the Service UID binary value. It represents a GUID (for example c3 d1 9a 7b 80 1b c4 4a 96 0a e5 b6 3b f9 7c 7e).
  5. Locate the subfolder in your profile that matches the GUID value identified in step 6 (for example, \c3d19a7b801bc44a960ae5b63bf97c7e).
  6. Under the subkey found in step 7, examine the 01023d0d binary value. It represents a GUID (for example, 5f cf d5 f1 ba 5c 6f 45 b3 57 cc 5e 0d 16 94 58).
  7. Locate the subfolder in your profile that matches the GUID value identified in step 8 (for example, \5fcfd5f1ba5c6f45b357cc5e0d169458).
  8. In this location you need to create a new String value that’s named 001e6603:
  9. Find the user’s Legacy Exchange DN. Hold down the Ctrl key and right-click the Outlook system tray icon, and then select Test E-mail AutoConfiguration.
  10. After the box appears, clear both the Use GuessSmart and Secure Guessmart Authentication check boxes, and then click Test. After the test is complete click the XML tab, and then locate the LegacyDN value.

To get the LegacyDN look at the first part of the tutorial.

Go back to the registry and populate the Value data field with this information, as follows:

Now, completely log off Skype and make sure that it’s not running. Then, log back in to Skype, and wait a minute or two. Check the Skype configuration. It should now show MAPI Status OK.

“MAPI unavailable” error in Skype for Business 2016 client

Applies to: Skype for Business 2016

Symptoms


In certain situations, the MAPI connection to Exchange Server may not be available to Skype for Business 2016 clients. This issue occurs in the following scenarios:

  • You have a new installation of Office 2016, or you create a new Outlook 2016 profile.
  • You upgrade an existing Office 2013 installation to Office 2016, and then you create a new Outlook 2016 Exchange Server profile.

This issue may occur for Office 365 Exchange Online or Exchange On-Premises users. When this issue occurs, the MAPI connection is unavailable to Skype for Business 2016 clients. Additionally, you may experience the following symptoms:

  • The Skype for Business Configuration Information feature (hold down the Ctrl key and right-click the Skype for Business 2016 system tray icon) shows a “MAPI unavailable” status, as shown.The screenshot for MAPI status
    If you click the Conversations tab (the conversations tab ), and then you click View more in Outlook, you receive the following error message:

    Your Outlook profile is not configured correctly. Contact your support team with this information.
  • Delegate functionality may be broken. For example, you cannot schedule a meeting on behalf of someone else. When you try to create the online meeting, you receive the following error message:
    You do not have permissions to schedule online meetings on behalf of the owner of this account. Please contact the owner of the account to get delegate permissions in Lync.

Cause


Outlook 2016 uses an updated method to cache MAPI connection information. In earlier versions of Outlook, the MAPI connection information is written to the registry, and Skype for Business clients read this registry location to obtain the MAPI connection information.

Tutorial: PowerShell Repository and change control

General

When I first started with PowerShell I had a folder in OneDrive where I kept a few scripts starting with ‘Login-Office365’. It were pre-scripted scripts for me I could use as a servicedesk engineer. After awhile the scripts in this folder became more and more. I created folders to categorize them.

This worked perfectly until I found Azure Automation, that was magical. I didn’t need to browse through folders and search for my scripts. I used Azure Automation as a ‘database’.

My colleague (Also a good tutor ;-)) told me I abused the function, but I didn’t care I had all my scripts handy.

After awhile I had 200+ scripts in Azure Automation and the search function didn’t do much good anymore.

I had files like this:

  • Get-ADUser-Searchbase-OU.ps1
  • Get-ADUser-Export-CSV.ps1
  • Get-ADUser-Set-ADUser.ps1
  • Get-ADUser….
  • Get-ADUser….
  • Etc..

Imagine so many scripts for almost the same function for 80% of the cmdlets in Office 365, Exchange Online, Active Directory, and others.

It became a complete mess. I had to confess to my colleague that it wasn’t working for me anymore. He told and explained me all about Visual Studio Online Repository and I made a tutorial out of it.

Because I think more people should know about this I made a tutorial. I hope you’ll use it and otherwise comment below if you even have a better idea.

PowerShell to Visual Studio Online Repository Requirements.

There are a few requirements though. They’re simple and you might be using them already.

Requirements

PowerShell to Visual Studio Online Repository.

Let’s start!
  1. Go to Visualstudio Online
  2. Login to your account > open your profile and start a New Team Project.
    As you can see in the image I already have a Projects. Below the project is a button to create a New Team Project.
PowerShell to Visual Studio Online Repository
PowerShell to Visual Studio Online Repository

Fill in a Project name and leave the rest like it is.
Click Create
(Yes, I know I called mine PHP! Why would I need 2 PowerShell Libraries? ;-))

PowerShell to Visual Studio Online Repository
PowerShell to Visual Studio Online Repository

After you create the new project we can clone it to Visual Studio. There is a button to clone it to Visual Studio. Make sure you’ve installed Visual Studio by now!

PowerShell to Visual Studio Repository
PowerShell to Visual Studio Repository

Your browser will ask you if you  want to open the file format with Visual Studio. That’s up to you to decide, but you cannot clone your repository if you don’t.

Click Open Microsoft Visual…ndler Selector

PowerShell to Visual Studio Repository

Visual Studio will start and you’ll see your repository to the right.
Before you click Clone lets look at the locations.

  1. Is the location in Visual Studio Online. We cannot change that.
  2. Is the location on your local disk. I changed the location for myself to a OneDrive directory to keep an extra backup. This is up to you.

Click Clone when you’re ready.

PowerShell to Visual Studio Repository
PowerShell to Visual Studio Repository

You’ll see this message:
 The repository was cloned successfully. Create a new project or solution in this repository.

So our clone was successful, great!

We got a repository in Visual Studio Online which is synced locally. What does that mean?

Now we’ve got a repository we can start using the change control Visual Studio offers and keep an online ‘database’ for all our scripts/files/whatever we use on a daily basis.

Now we’ve got a repository in Visual Studio Online we can start using all the features VSO has to offer and keep an online ‘database’ for all our scripts, files, or whatever you want to use it for. I use it on a daily basis.

Lets go through the change control process!

For me personally this is one of the most important parts. You can change control a repository that’s shared with other users.
At this point we’ll start using Visual Studio Code.

  1. Start visual studio code.
  2. Go to File > Open Folder > Open local folder where you cloned the repository.
  3. Now we’ve got the folder open, we can start creating a new file.
    Click the New file button next to the folder name.

As you can see for yourself, the file became green with a U, but there is also a 1 at the source control (The button that looks like a sharing button).
If you hover your mouse over it, it will say:
Source Control (Ctrl + Shift + G) – 1 pending changes

Source Control (Ctrl + Shift + G) - 1 pending changes
Source Control (Ctrl + Shift + G) – 1 pending changes

Let’s go to Source Control.

There is a change for the test.php file.
Lets make another change to the file and add some content.
So first I added “Beast!” and after that I added “BlBAlbLAbLABALBALAB”
It will compare the changes:

Compare Visual Studio Code
Compare Visual Studio Code

Lets say you want to revert the changes, you can right click the file under the folder and click the button Discard Changes.

If the changes are correct you can click the + button. This will Stage the changes. The changes are staged and you’ll be able to commit your changes.
To commit a change you can write down a message of why you commited this change:

Write down your message and press commit:

Commit changes Visual Studio Code
Commit changes Visual Studio Code

This will only commit the changes in your local repository though!
Open the 3 dots, find sync, and sync your repository back to Visual Studio Online.

As you can see all of my scripts are synced back to Visual Studio Online:

Visual Studio Code Online
Visual Studio Code Online

Get the best out of Visual Studio Code for PowerShelling.

extensions

Let’s start with installing the Extensions necessary to use PowerShell comfortably.
Go to extensions:

I’ve got 3 extension installed, but we’re going for two extensions.

  1. PowerShell – This extension is necessary to develop PowerShell scripts so start downloading it.
  2. vscode-icons – This one isn’t necessary, but will show an icon before the scripts and will make your life a lot easier.
Let’s take a look at the theme

Visual Studio Code has quite a few themes, but if you’re a true PowerShell guru there is one theme that is meant for you. One of the themes is named “PowerShell_ISE”

You are only able to load the theme if you have the PowerShell extension installed.
Go to preferences > Color Theme > select the PowerShell_ISE Theme.

search function

Another huge perk is the search function. It will not only search for file names, but it will also search in the content. This makes it extremely useful. I can compare scripts quickly and decide which one I want to use.

Here is an example:

last but not least, the graphical user interface

Can’t say much about this one, but I like the GUI so much more than that of PowerShell_ISE, but that is preference of course.

That’s it. Can’t think of anything more. This is how I work now and I love it.
Thanks Erik!
Do you have better idea’s? Please comment them below!