Visual Studio Code: How to enable Cloud Sync
SID-500.COM
by Patrick Gruenauer
2d ago
VS Code is supposed to be the successor of PowerShell ISE. The flexibility of VS Code is enormous, yet there are not only fans of VS Code. To make it easier to get started, I always recommend to activate the Cloud Sync so that VS Code has the same look on all computers and also the extensions are automatically adapted and installed. Let’s get started. In this post I will show you how to enable Cloud Sync. Turning on Cloud Sync Install and open VS Code. Click on the icon on the left side to open the Sync menu. Next, click on Sign in to Sync Settings. A browser window opens. Enter your credent ..read more
Visit website
PowerShell: How to ping multiple Computers at once
SID-500.COM
by Patrick Gruenauer
3w ago
You want to ping multiple computers at once? Can’t? Yes you can, with PowerShell. In this post I’ll show you a few examples of how you can ping multiple computers. We will use the Test-Connection cmdlet for this task. It’s going to be exciting. Let’s get started. Open PowerShell 5.1 or PowerShell 7. Example 1: Ping multiple Computers Test-Connection -ComputerName sid-500.com,192.168.0.1,microsoft.com -Count 1 Example 2: Ping all Domain-Computers Test-Connection -ComputerName (Get-ADComputer -Filter * | Select-Object -ExpandProperty Name) -Count 1 Example 3: Ping Computers from Text File ..read more
Visit website
Exchange Online: How to set Junk Settings for Shared Mailboxes
SID-500.COM
by Patrick Gruenauer
2M ago
When working with shared mailboxes, there is a problem: the user connected to this mailbox cannot configure the Junk Mail Settings for this shared mailbox in Outlook itself. In this blog post I show how to configure the junk mail settings for a shared mailbox using the Exchangen Online module and PowerShell. Prerequisites If you have not already done so, install the Exchange Online module. Open PowerShell and enter the following line. Install-Module -Name ExchangeOnlineManagement -Force -AllowClobber Next, we connect to Exchange Online. Connect-ExchangeOnline Action In my case I use the ..read more
Visit website
Active Directory: How to retrieve the Domain SID
SID-500.COM
by Patrick Gruenauer
3M ago
Recently I needed the domain SID to configure MFA with a 3rd party tool. Where can I get the domain SID? That’s exactly what I will show in this blog post. Let’s get started! Retrieving Domain SID Open PowerShell. Hit the keys and enter the One-Liner below to retrieve the Domain SID of your Active Directory Domain. (Get-ADDomain).DomainSID.Value With this command the domain SID is not displayed, it is copied to the clipboard. (Get-ADDomain).DomainSID.Value | Set-Clipboard To save the domain SID to a file execute the following command. (Get-ADDomain).DomainSID.Value | Out-File $home ..read more
Visit website
PowerShell: Search for Empty Folders (and delete them)
SID-500.COM
by Patrick Gruenauer
3M ago
We live in times of Big Data. Too much data in too short a time. You may have empty folders in your environment and if you want to search for them and delete them then you are at the right place. We will do just that. Run this little script below to remove all empty folders. At the top you need to specify the path to the root folder. In my case this is C:\Data. You will be asked to confirm the deletion. # Folder empty, then remove them $path = 'C:\Data' Get-ChildItem $path -Recurse -Directory | ForEach-Object { If((Get-ChildItem $_.FullName) -eq $null) { Remove-Item -Path $_.Fu ..read more
Visit website
PowerShell: List and document all Hyper-V VMs with the most important properties
SID-500.COM
by Patrick Gruenauer
4M ago
So you have multiple Hyper-V VMs and may have lost track of them. In this post I will show you how to retrieve all Hyper-V VMs with the most important properties and settings. With PowerShell of course – what else. Run this little nice script to get the most important properties of your VMs. Get-VM | Select-Object Name,ProcessorCount,` @{name='MemoryStartup';expression={[math]::Round($_.MemoryStartup/1GB,0).tostring() + ' GB'}},` @{name='MemoryAssigned';expression={[math]::Round($_.MemoryAssigned/1GB,0).tostring() + ' GB'}},` @{n='Uptime';e={(Get-Date) - $_.Uptime}},State,Version | Format-Ta ..read more
Visit website
Active Directory: List all Network Shares from all Windows Servers
SID-500.COM
by Patrick Gruenauer
4M ago
In today’s blog post I show how to retrieve all network shares from all servers in an Active Directory domain to get a nice list in the output. This script is used to document your Active Directory environment. Let’s get started. Retrieve all Server by Name First of all, we need to retrieve the server names. # Retrieve Server Names $server = Get-ADComputer -Filter 'operatingsystem -like "*server*"' | Select-Object -ExpandProperty Name Short review. Great! Retrieving all Share Names of all Servers Now the party begins. Since we have all the server names, we can use Invoke-Command and Get-S ..read more
Visit website
Neuer YouTube Kanal [DE]
SID-500.COM
by Patrick Gruenauer
4M ago
Liebe FollowerInnen! Auf meinem neuen YouTube Kanal werde ich wöchentlich Videos zu den Themen Cloud, PowerShell, Windows Server, Netzwerktechnik, Security und vieles mehr veröffentlichen. Sprache ist Deutsch. Hier gehts zum Kanal: https://www.youtube.com/@patrickgruenauer Über ein Abo oder ein Like würde ich mich sehr freuen. Liebe Grüße Patrick Gruenauer ..read more
Visit website
PowerShell: Copy File to multiple (all) Hyper-V VMs
SID-500.COM
by Patrick Gruenauer
5M ago
In this post, I’ll show you how to copy one or more files to all VMs in Hyper-V. I would say: Let’s get started. Prerequisites To copy files, guest services must be enabled on all VMs. The guest services are part of the integration services. By default, they are not enabled! To enable Guest Services on all Hyper-V VMs run the code below. Get-VM | Enable-VMIntegrationService -Name 'Guest Service Interface' Then the verification. Get-VM | Get-VMIntegrationService Action: Copy one file to all VMs Now we are ready to copy a file to all VMs. The file will be copied from the user home folder t ..read more
Visit website
PowerShell: Error Handling with $Error
SID-500.COM
by Patrick Gruenauer
5M ago
The $Error Variable in PowerShell contains all error objects of the current session. In this blog post I will carry out some tasks with $Error and show you how $Error can help you to troubleshoot and debug your PowerShell code. Let’s jump in. Assume you are trying to list a folder that doesn’t exist. Get-ChildItem C:\nothere We are faced with an error message. This error message will be stored in the $Error Variable. $Error But, wait a minute, what kind of error is it? $error.CategoryInfo Now let’s clear this error. $error.Clear() What about other error categories? Check out th ..read more
Visit website

Follow SID-500.COM on FeedSpot

Continue with Google
Continue with Apple
OR