.net core
28 TopicsHow to find out the type of a generic class?
Exmple: create a new List<string> instance: $a = [System.Collections.Generic.List[string]]::new() With: $a.GetType() I only get: IsPublic IsSerial Name BaseType -------- -------- ---- -------- True True List`1 System.Object How can I tell what type the list is (in my case, string)?Solved106Views0likes2Commentspositioning 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.143Views0likes1CommentWhich 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.8KViews0likes3Commentsshadowcopy
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! Rod605Views0likes2CommentsSet 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?544Views0likes5CommentsError - 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'898Views0likes1CommentHow 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 use723Views0likes3CommentsHow 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?514Views0likes3CommentsAutomatisation 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 Ludovic544Views0likes1Comment