.NET Core
26 Topicspositioning a set of powershell windows
Greetings, I'm completely new to this area. I have a requirement to display 3 separate powershell windows that are created from nodejs on my server, in essentially this format, ------- ---------------------------- | 1 | | 2 | ------- ----------------------------- ------------------------------------- | 3 | -------------------------------------- is the monitoring server app is the adminController app is the mainServerHub for all client connections to main app. is started manually on the server and automatically positions itself on the screen is created by the monitoring server app (1) and should be positioned on the right of screen 1 is also created by the monitoring server app (1) and should be positioned under both 1 and 2 I have searched many descriptions and links to resolve this challenge. I'm successful in creating all of the powershell windows from nodejs, but it has quite a challenge trying to manipulate their positions, and I'm looking for the appropriate cmdlets to accomplish this task. Can anyone point me in the right direction? Thanks Scott.11Views0likes1CommentWhich of Get-AppxPackage's "Remove-AppxPackage" and winget.exe's "uninstall" is preferable?
Without regard for the specified software that is designed for removal, how do the undermentioned: winget uninstall --id 'Microsoft.Windows.Photos_8wekyb3d8bbwe' -e ...and the undermentioned: Get-AppxPackage -AllUsers *Microsoft.Xbox* | Remove-AppxPackage ...differ?4.3KViews0likes3Commentsshadowcopy
I see when I type wmic /? it shows me wmi options for shadowcopy. Thats great if using the deprecated WMI tool. Leads me to, so I can pull shadowcopy information using WMI tool, what about PS? When I search for shadowcopy with powershell, I find nothing. If there is some shadowcopy hooks in powershell what are they? And can we make them easier to find? seaching all PS docs using below comes up with nothing! Import-Module (Microsoft.PowerShell.Core) - PowerShell | Microsoft Learn\ Thanks! Rod195Views0likes2CommentsSet exchange policy with filter?
I am trying to figure out how to run a command to create a exchange online emailadresspolicy. New-EmailAddressPolicy -Name Groups1 -IncludeUnifiedGroupRecipients -EnabledEmailAddressTemplates "SMTP:@santa.mycompany.com","smtp:@santa.mycompany.com" -RecipientFilter {mailNickname -like 'Santa_*'} -Priority 1 I want all groups that are that have a mailnickname that starts with "Santa_" to be created with a specific subdomain. I can not create it tho, i get error that recipientFilter is not a valid attribute. New-EmailAddressPolicy: A parameter cannot be found that matches parameter name 'RecipientFilter'. i have also tried ConditionalCustomAttribute1 but get the same error: anyone able to help?452Views0likes5CommentsError - Connect-ExchangeOnline Error Acquiring Token: System.Net.Http.HttpRequestException
Error Connect-ExchangeOnline Error Acquiring Token: System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: Remote name could not be resolved: 'server.proxy.local'565Views0likes1CommentHow to Execute Disable-NetAdapter from Constrained Runspace?
Please, I need help ASAP!!! What .NET Class maps to Disbale-NetAdapter Commandlet? E.g., the .NET Class, GetDateCommand is an Implementation of the get-date commandlet. ----------------------------------------------------------------------------------------------------------------- var getDateCommand = new SessionStateCmdletEntry("get-date", typeof(GetDateCommand), null); powerShellSession.Commands.Add(getDateCommand); ----------------------------------------------------------------------------------------------------------------- I need to know the Class to use for Disbale-NetAdapter, please. That is what type am I to use625Views0likes3CommentsHow to change remote session prompt?
For my 7.4.1 Powershell, I have a custom prompt stored in $PROFILE\profile.ps1 (that's the only profile file that exists on my machine). This works well until I start a remote session using Enter-PSSession, where I get a default prompt. How can I apply my custom prompt to remote sessions as well?447Views0likes3CommentsAutomatisation d’achat en ligne
Bonjour la communauté, Ayant l’habitude de faire mes courses en ligne, j’ai eu une idée assez farfelue qui est d’automatiser mes achats de courses en ligne. en effet, j’aimerais faire un script qui, a partir d’un bon de commande, pourrait aller sur les site web défini dans une variable de type tableau (exemple: Carrefour,E.Leclerc,Intermarché) comparer les prix et ajouter les articles les moins dans le panier du site associé. J’ai d’assez bonne notions de PowerShell mais étant autodidacte et n’ayant jamais exploité de données web (web scraping). Je viens à vous pour vous demander si c’était faisable, si oui par où commencer ? Dois-je associer d’autre language avec celui de PowerShell ? Si oui lesquels ? Mes compétences se limitent vraiment au PowerShell dans la partie web c’est pour cela que je vous demande conseil. En vous remerciant d’avance pour vos réponse. Cordialement BEGUE Ludovic482Views0likes1CommentC# + PowerShell + Linux AKS - Cmdlet results in failure, but action executed
Our code is in C# and we use .NET7 & PowerShell SDK 7.3.6 & have this application deployed in AKS. The Docker image is based on aspnet:7.0-apline image with PowerShell 7 installed & PSWSMan, WSMan and ExchangeOnlineManagement (v3) modules installed. We use an enterprise application connecting to Exchange Online via certificate authentication. We limit the commands to retrieve into the PowerShell session to New-Mailbox cmdlet only. Each command gets its own PS session reusing previously constructed runspace. When we try to restore a previously deleted mailbox, we occasionally receive PSRemotingTransportException. The details we observe there are: ErrorCode: 2101 CategoryInfo.Category: ResourceUnavailable CategoryInfo.Reason: ParentContainsErrorRecordException Exception message: The background process closed or ended abnormally: \n Exit code: 137\n Stdout: ''\n Stderr: ''\n . When we execute this with multiple users at the same time (15 users, ~3 in parallel) - we receive such error 1-3 times out of whole batch of 15 mailboxes. The issue is not on failure - because we can handle it. The main problem is that those users/mailboxes are actually (almost always) created, but the PowerShell connection is "interrupted" or something indicating there was an error and we need to go through additional steps. Has anyone observed anything similar? Is there any reason for such error on our side? Is there anything we could try to get this more robust? Does anyone an idea on what the 2101 error stands for?Solved845Views0likes2Comments