Svrooij.BetterGraph.xml
<?xml version="1.0"?> <doc> <assembly> <name>Svrooij.BetterGraph</name> </assembly> <members> <member name="T:Svrooij.BetterGraph.Commands.ConnectBgGraph"> <summary> <para type="synopsis">Connect to Microsoft Graph</para> <para type="description">As with the regular module, you'll need to connect to Graph.</para> </summary> <psOrder>2</psOrder> <parameterSet> <para type="name">Interactive</para> <para type="description">Interactive browser login. This will integrate with the native broker based login screen on Windows and with the default browser on other platforms.</para> </parameterSet> <parameterSet> <para type="name">UseDefaultCredentials</para> <para type="description">A more extended version of the Managed Identity is the Default Credentials, this will use the [DefaultAzureCredential](https://learn.microsoft.com/dotnet/api/azure.identity.defaultazurecredential?view=azure-dotnet&wt.mc_id=SEC-MVP-5004985), from the `Azure.Identity` package. This will try several methods to authenticate, Environment Variables, Managed Identity, Azure CLI and more.</para> </parameterSet> <parameterSet> <para type="name">Token</para> <para type="description">Let's say you have a token from another source, just hand us to token and we'll use it to connect to Intune. This token has a limited lifetime, so you'll be responsible for refreshing it.</para> </parameterSet> <parameterSet> <para type="name">ClientCredentials</para> <para type="description">:::warning Last resort\r\nUsing client credentials is not recommended because you'll have to keep the secret, **secret**!\r\n\r\nPlease let us know if you have to use this method, we might be able to help you with a better solution.\r\n:::</para> </parameterSet> </member> <member name="P:Svrooij.BetterGraph.Commands.ConnectBgGraph.Username"> <summary> </summary> </member> <member name="P:Svrooij.BetterGraph.Commands.ConnectBgGraph.TenantId"> <summary> </summary> </member> <member name="P:Svrooij.BetterGraph.Commands.ConnectBgGraph.NoBroker"> <summary> </summary> </member> <member name="P:Svrooij.BetterGraph.Commands.ConnectBgGraph.ClientSecret"> <summary> Client secret for client credentials flow </summary> </member> <member name="P:Svrooij.BetterGraph.Commands.ConnectBgGraph.Token"> <summary> Use a token from another source to connect to Intune </summary> </member> <member name="P:Svrooij.BetterGraph.Commands.ConnectBgGraph.UseDefaultCredentials"> <summary> Use default Azure Credentials from Azure.Identity to connect to Graph </summary> </member> <member name="M:Svrooij.BetterGraph.Commands.ConnectBgGraph.ProcessRecordAsync(System.Threading.CancellationToken)"> <inheritdoc /> </member> <member name="T:Svrooij.BetterGraph.Commands.Users.GetBgUser"> <summary> <para type="synopsis">List users or get single user</para> <para type="description">\r\n\r\nThis is an [**authenticated command**](./authentication), so call [Connect-BgGraph](./Connect-BgGraph) before calling this command.</para> </summary> <psOrder>10</psOrder> <example> <para type="name">Get top 10 users and select few parameters</para> <para type="description">Get a list of first 10 users in this tenant, and format the result as a table.</para> <code>Get-BgUser -Top 10 -Select Id, DisplayName, UserPrincipalName | Format-table -Property Id, DisplayName, UserPrincipalName</code> </example> <example> <para type="name">Get user by id</para> <para type="description">Get a single user by id (or user principal name)</para> <code>Get-BgUser -UserId "8195b446-e1dd-4064-a410-a1494d1ffe1b" | Format-List</code> </example> <example> <para type="name">Auto paging</para> <para type="description">Let the module auto page over all results in pages of 10, you'll get the Users async as long as you use them in a pipe</para> <code>Get-BgUser -Top 10 -All -Select Id, DisplayName, UserPrincipalName | Format-Table -Property Id, DisplayName, UserPrincipalName</code> </example> <example> <para type="name">Manual paging</para> <para type="description">If you get users and do not set the `-All` parameter, it will set the `$GetBgUserNextLink` if there are more pages. Use this code to get the next page.</para> <code>Get-BgUser -NextLink $GetBgUserNextLink | Format-Table -Property Id, DisplayName, UserPrincipalName</code> </example> <parameterSet> <para type="name">ById</para> <para type="description">Get a single user by specifying the UserId.</para> </parameterSet> <parameterSet> <para type="name">Users</para> <para type="description">Get a list of users, optionally filtered, selected, or paged.</para> </parameterSet> <parameterSet> <para type="name">UsersPaging</para> <para type="description">Get the next page of users using a NextLink from a previous response.</para> </parameterSet> </member> <member name="T:Svrooij.BetterGraph.Commands.Users.NewBgUser"> <summary> <para type="synopsis">Create a new user in Microsoft Graph.</para> <para type="description"> This is an <b>authenticated command</b>, so call <c>Connect-BgGraph</c> before using this command. </para> </summary> <psOrder>20</psOrder> <example> <para type="name">Create a simple user</para> <para type="description">Create a user with a display name, user principal name, and password.</para> <code>New-BgUser -UserPrincipalName "john.doe@contoso.com" -DisplayName "John Doe" -Password "P@ssw0rd!"</code> </example> <example> <para type="name">Create a user from a user object</para> <para type="description">Create a user by passing a pre-configured <c>User</c> object.</para> <code>$user = [Microsoft.Graph.Beta.Models.User]::new() $user.UserPrincipalName = "jane.doe@contoso.com" $user.DisplayName = "Jane Doe" New-BgUser -User $user -Password "AnotherP@ssw0rd!"</code> </example> <parameterSet> <para type="name">Simple</para> <para type="description">Create a user by specifying <c>UserPrincipalName</c>, <c>DisplayName</c>, and <c>Password</c> directly.</para> </parameterSet> <parameterSet> <para type="name">Object</para> <para type="description">Create a user by passing a <c>User</c> object, optionally with a <c>Password</c>.</para> </parameterSet> </member> <member name="T:Svrooij.BetterGraph.Commands.Users.RemoveBgUser"> <summary> <para type="synopsis">Remove a user from Microsoft Graph.</para> <para type="description"> This is an <b>authenticated command</b>, so call <c>Connect-BgGraph</c> before using this command. </para> </summary> <psOrder>30</psOrder> <example> <para type="name">Remove a user by ID</para> <para type="description">Delete a user by specifying their unique ID.</para> <code>Remove-BgUser -UserId "8195b446-e1dd-4064-a410-a1494d1ffe1b"</code> </example> <parameterSet> <para type="name">Default</para> <para type="description">Remove a user by specifying the <c>UserId</c>.</para> </parameterSet> </member> <member name="T:Svrooij.BetterGraph.Commands.Users.SetBgUser"> <summary> <para type="synopsis">Update an existing user in Microsoft Graph.</para> <para type="description"> This is an <b>authenticated command</b>, so call <c>Connect-BgGraph</c> before using this command. Use this command to modify properties of an existing user by specifying their <c>UserId</c> and a <c>User</c> object with updated values. </para> </summary> <psOrder>40</psOrder> <example> <para type="name">Update a user's display name</para> <para type="description">Change the display name of a user by specifying their ID and a user object with the new display name.</para> <code> $user = [Microsoft.Graph.Beta.Models.User]::new() # Or get the user from Get-BgUser and modify it $user.DisplayName = "New Display Name" Set-BgUser -UserId "8195b446-e1dd-4064-a410-a1494d1ffe1b" -User $user</code> </example> <parameterSet> <para type="name">Default</para> <para type="description">Update a user by specifying the <c>UserId</c> and a <c>User</c> object containing the properties to update.</para> </parameterSet> </member> <member name="F:Svrooij.BetterGraph.Plumbing.BrokerHandle.GetAncestorFlags.GetRootOwner"> <summary> Retrieves the owned root window by walking the chain of parent and owner windows returned by GetParent. </summary> </member> <member name="M:Svrooij.BetterGraph.Plumbing.BrokerHandle.GetAncestor(System.IntPtr,Svrooij.BetterGraph.Plumbing.BrokerHandle.GetAncestorFlags)"> <summary> Retrieves the handle to the ancestor of the specified window. </summary> <param name="hwnd">A handle to the window whose ancestor will be retrieved. If this parameter is the desktop window, the function returns NULL. </param> <param name="flags">The ancestor to be retrieved.</param> <returns>The return value is the handle to the ancestor window.</returns> </member> <member name="T:Svrooij.PowerShell.DI.GenerateBindingsAttribute"> <summary> Tell the source generator to generate code to bind the dependencies instead of using reflection. </summary> <remarks>Your class has to be a partial class and extend <see cref="T:Svrooij.PowerShell.DI.DependencyCmdlet`1"/>.</remarks> </member> <member name="T:Svrooij.PowerShell.DI.ServiceDependencyAttribute"> <summary> Mark a field or property as a dependency that has to be resolved by the <see cref="T:System.IServiceProvider"/>. </summary> </member> <member name="P:Svrooij.PowerShell.DI.ServiceDependencyAttribute.Required"> <summary> Should the dependency be required, if it is not found an exception will be thrown. </summary> </member> <member name="T:Svrooij.PowerShell.DI.Logging.PowerShellLogger"> <summary> <see cref="T:Microsoft.Extensions.Logging.ILogger"/> that outputs to the PowerShell <see cref="T:System.Management.Automation.PSCmdlet"/> </summary> </member> <member name="M:Svrooij.PowerShell.DI.Logging.PowerShellLogger.#ctor(System.String,System.Func{Svrooij.PowerShell.DI.Logging.PowerShellLoggerConfiguration},System.Management.Automation.PSCmdlet)"> <summary> Constructor for <see cref="T:Svrooij.PowerShell.DI.Logging.PowerShellLogger"/> </summary> <remarks>Called automatically by the <see cref="T:Svrooij.PowerShell.DI.Logging.PowerShellLoggerProvider"/></remarks> </member> <member name="M:Svrooij.PowerShell.DI.Logging.PowerShellLogger.Log``1(Microsoft.Extensions.Logging.LogLevel,Microsoft.Extensions.Logging.EventId,``0,System.Exception,System.Func{``0,System.Exception,System.String})"> <inheritdoc/> </member> <member name="M:Svrooij.PowerShell.DI.Logging.PowerShellLogger.IsEnabled(Microsoft.Extensions.Logging.LogLevel)"> <inheritdoc/> </member> <member name="M:Svrooij.PowerShell.DI.Logging.PowerShellLogger.BeginScope``1(``0)"> <inheritdoc/> </member> <member name="T:Svrooij.PowerShell.DI.Logging.PowerShellLoggerConfiguration"> <summary> Configuration for the <see cref="T:Svrooij.PowerShell.DI.Logging.PowerShellLoggerProvider"/> </summary> </member> <member name="P:Svrooij.PowerShell.DI.Logging.PowerShellLoggerConfiguration.DefaultLevel"> <summary> Minimum level of log messages to output </summary> </member> <member name="P:Svrooij.PowerShell.DI.Logging.PowerShellLoggerConfiguration.LogLevel"> <summary> Override the minimum level for specific categories (Type Names) </summary> </member> <member name="P:Svrooij.PowerShell.DI.Logging.PowerShellLoggerConfiguration.IncludeCategory"> <summary> Specify if the log message should be prefixed with the category name </summary> </member> <member name="P:Svrooij.PowerShell.DI.Logging.PowerShellLoggerConfiguration.StripNamespace"> <summary> Strip the namespace from the category name </summary> </member> <member name="T:Svrooij.PowerShell.DI.Logging.PowerShellLoggerProvider"> <summary> <see cref="T:Microsoft.Extensions.Logging.ILoggerProvider"/> that outputs to the PowerShell <see cref="T:System.Management.Automation.PSCmdlet"/> </summary> </member> <member name="M:Svrooij.PowerShell.DI.Logging.PowerShellLoggerProvider.#ctor(Microsoft.Extensions.Options.IOptionsMonitor{Svrooij.PowerShell.DI.Logging.PowerShellLoggerConfiguration})"> <summary> Creates a new instance of <see cref="T:Svrooij.PowerShell.DI.Logging.PowerShellLoggerProvider"/> </summary> <param name="config">Auto loaded configuration</param> </member> <member name="M:Svrooij.PowerShell.DI.Logging.PowerShellLoggerProvider.CreateLogger(System.String)"> <summary> Creates a new <see cref="T:Microsoft.Extensions.Logging.ILogger"/> instance. </summary> <param name="categoryName">Category name to use</param> <returns><see cref="T:Microsoft.Extensions.Logging.ILogger"/></returns> </member> <member name="M:Svrooij.PowerShell.DI.Logging.PowerShellLoggerProvider.Dispose"> <summary> Dispose the provider </summary> </member> <member name="M:Svrooij.PowerShell.DI.Logging.PsCmdletExtensions.WriteLog(System.Management.Automation.PSCmdlet,Microsoft.Extensions.Logging.LogLevel,System.Int32,System.String,System.Exception)"> <summary> Write a log message to the provider PowerShell <see cref="T:System.Management.Automation.PSCmdlet"/> </summary> <param name="cmdlet"><see cref="T:System.Management.Automation.PSCmdlet"/> that is used for the log message</param> <param name="logLevel"><see cref="T:Microsoft.Extensions.Logging.LogLevel"/> for the message, will be put in from the message</param> <param name="eventId">The ID for this specific event</param> <param name="message">Log message</param> <param name="e">(optional) <see cref="T:System.Exception"/></param> </member> <member name="M:Svrooij.PowerShell.DI.Logging.PowershellLoggingBuilderExtensions.AddPowerShellLogging(Microsoft.Extensions.Logging.ILoggingBuilder,System.Management.Automation.PSCmdlet)"> <summary> Adds a PowerShell logger named 'PowerShell' to the logger factory. </summary> <param name="builder"><see cref="T:Microsoft.Extensions.Logging.ILoggingBuilder"/> that you get when you call serviceCollection.AddLogging(builder =>)</param> <param name="cmdlet">The <see cref="T:System.Management.Automation.PSCmdlet"/> that is used to output the log info</param> <returns><see cref="T:Microsoft.Extensions.Logging.ILoggingBuilder"/> to support chaining</returns> </member> <member name="M:Svrooij.PowerShell.DI.Logging.ServiceProviderLoggerExtensions.AddPowerShellLogging(Microsoft.Extensions.DependencyInjection.IServiceCollection,System.Management.Automation.PSCmdlet,System.Action{Svrooij.PowerShell.DI.Logging.PowerShellLoggerConfiguration})"> <summary> Adds a PowerShell logger named 'PowerShell' to the service collection. </summary> <param name="services"><see cref="T:Microsoft.Extensions.DependencyInjection.IServiceCollection"/> you want to add logging to</param> <param name="cmdlet"><see cref="T:System.Management.Automation.PSCmdlet"/> that is used to output the log info</param> <param name="configure">(optional) action to configure the <see cref="T:Svrooij.PowerShell.DI.Logging.PowerShellLoggerConfiguration"/></param> <returns><see cref="T:Microsoft.Extensions.DependencyInjection.IServiceCollection"/> to support chaining</returns> <exception cref="T:System.ArgumentNullException">When one of the required arguments are not set</exception> </member> <member name="T:Svrooij.PowerShell.DI.ThreadAffinitiveSynchronizationContext"> <summary> A synchronisation context that runs all calls scheduled on it (via <see cref="M:System.Threading.SynchronizationContext.Post(System.Threading.SendOrPostCallback,System.Object)"/>) on a single thread. </summary> <remarks>This part is taken from <see href="https://github.com/NTTLimitedRD/OctopusDeploy.Powershell/blob/7653993ffbf3ddfc7381e1196dbaa6fdf43cd982/OctopusDeploy.Powershell/ThreadAffinitiveSynchronizationContext.cs">OctopusDeploy.Powershell</see> licensed under <see href="https://github.com/NTTLimitedRD/OctopusDeploy.Powershell/blob/7653993ffbf3ddfc7381e1196dbaa6fdf43cd982/LICENSE">MIT</see></remarks> </member> <member name="F:Svrooij.PowerShell.DI.ThreadAffinitiveSynchronizationContext._workItemQueue"> <summary> A blocking collection (effectively a queue) of work items to execute, consisting of callback delegates and their callback state (if any). </summary> </member> <member name="M:Svrooij.PowerShell.DI.ThreadAffinitiveSynchronizationContext.Dispose"> <summary> Dispose of resources being used by the synchronization context. </summary> </member> <member name="M:Svrooij.PowerShell.DI.ThreadAffinitiveSynchronizationContext.CheckDisposed"> <summary> Check if the synchronization context has been disposed. </summary> </member> <member name="M:Svrooij.PowerShell.DI.ThreadAffinitiveSynchronizationContext.RunMessagePump"> <summary> Run the message pump for the callback queue on the current thread. </summary> </member> <member name="M:Svrooij.PowerShell.DI.ThreadAffinitiveSynchronizationContext.TerminateMessagePump"> <summary> Terminate the message pump once all callbacks have completed. </summary> </member> <member name="M:Svrooij.PowerShell.DI.ThreadAffinitiveSynchronizationContext.Post(System.Threading.SendOrPostCallback,System.Object)"> <summary> Dispatch an asynchronous message to the synchronization context. </summary> <param name="callback"> The <see cref="T:System.Threading.SendOrPostCallback"/> delegate to call in the synchronization context. </param> <param name="callbackState"> Optional state data passed to the callback. </param> <exception cref="T:System.InvalidOperationException"> The message pump has already been started, and then terminated by calling <see cref="M:Svrooij.PowerShell.DI.ThreadAffinitiveSynchronizationContext.TerminateMessagePump"/>. </exception> </member> <member name="M:Svrooij.PowerShell.DI.ThreadAffinitiveSynchronizationContext.RunSynchronized(System.Func{System.Threading.Tasks.Task})"> <summary> Run an asynchronous operation using the current thread as its synchronization context. </summary> <param name="asyncOperation"> A <see cref="T:System.Func`1"/> delegate representing the asynchronous operation to run. </param> </member> <member name="M:Svrooij.PowerShell.DI.ThreadAffinitiveSynchronizationContext.RunSynchronized``1(System.Func{System.Threading.Tasks.Task{``0}})"> <summary> Run an asynchronous operation using the current thread as its synchronization context. </summary> <typeparam name="TResult"> The operation result type. </typeparam> <param name="asyncOperation"> A <see cref="T:System.Func`1"/> delegate representing the asynchronous operation to run. </param> <returns> The operation result. </returns> </member> <member name="T:Svrooij.PowerShell.DI.PsStartup"> <summary> Base class for startup classes for PowerShell cmdlets. Create a class that extends this class and override <see cref="M:Svrooij.PowerShell.DI.PsStartup.ConfigureServices(Microsoft.Extensions.DependencyInjection.IServiceCollection)"/>. </summary> <remarks> This class is called automatically by the <see cref="T:Svrooij.PowerShell.DI.DependencyCmdlet`1"/> constructor. Logging is automatically added to the <see cref="T:Microsoft.Extensions.DependencyInjection.IServiceCollection"/>, please don't mess with the logging part. </remarks> </member> <member name="M:Svrooij.PowerShell.DI.PsStartup.ConfigureServices(Microsoft.Extensions.DependencyInjection.IServiceCollection)"> <summary> Override this method to configure the <see cref="T:Microsoft.Extensions.DependencyInjection.IServiceCollection"/> needed by your application. </summary> <param name="services"><see cref="T:Microsoft.Extensions.DependencyInjection.IServiceCollection"/> that you can add services to.</param> <remarks>Logging is setup for you, overriding it breaks stuff!</remarks> </member> <member name="M:Svrooij.PowerShell.DI.PsStartup.ConfigurePowerShellLogging"> <summary> Override this method to configure the <see cref="T:Svrooij.PowerShell.DI.Logging.PowerShellLoggerConfiguration"/> needed by your application. </summary> <code> return builder => { builder.MinimumLevel = LogLevel.Information; }; </code> </member> <member name="T:Svrooij.PowerShell.DI.DependencyCmdlet`1"> <summary> Base class for cmdlets that use dependency injection. <para>Use the <see cref="T:Svrooij.PowerShell.DI.GenerateBindingsAttribute"/> to tell the compiler to generate binding code instead of using reflection</para> </summary> <typeparam name="T">Your startup class that has to extend <see cref="T:Svrooij.PowerShell.DI.PsStartup"/> and extend <see cref="M:Svrooij.PowerShell.DI.PsStartup.ConfigureServices(Microsoft.Extensions.DependencyInjection.IServiceCollection)"/>.</typeparam> <remarks>You should override <see cref="M:Svrooij.PowerShell.DI.DependencyCmdlet`1.ProcessRecordAsync(System.Threading.CancellationToken)"/>. A lot of other methods are blocked from overriding.</remarks> </member> <member name="M:Svrooij.PowerShell.DI.DependencyCmdlet`1.#ctor"> <summary> <see cref="T:Svrooij.PowerShell.DI.DependencyCmdlet`1"/> constructor, called by PowerShell. </summary> </member> <member name="M:Svrooij.PowerShell.DI.DependencyCmdlet`1.ProcessRecordAsync(System.Threading.CancellationToken)"> <summary> Override this method to process each record. </summary> <param name="cancellationToken">The cancellation token will be called when the user presses CTRL+C during execution</param> <remarks>Your overridden method will be called automatically!</remarks> <exception cref="T:System.NotImplementedException">When not overridden</exception> <exception cref="T:System.InvalidOperationException">When one or more dependencies marked as required are not found</exception> </member> <member name="P:Svrooij.PowerShell.DI.DependencyCmdlet`1.BindDependencies"> <summary> Override this property to bind dependencies manually, the service provider is provided by the base library. </summary> </member> <member name="M:Svrooij.PowerShell.DI.DependencyCmdlet`1.ProcessRecord"> <summary> You can call ProcessRecord, but you cannot override it! </summary> <remarks>Override the <see cref="M:Svrooij.PowerShell.DI.DependencyCmdlet`1.ProcessRecordAsync(System.Threading.CancellationToken)"/> method, which is called automatically.</remarks> </member> <member name="M:Svrooij.PowerShell.DI.DependencyCmdlet`1.BeginProcessing"> <summary> You can call BeginProcessing, but you cannot override it! </summary> <remarks>This is called by PowerShell automatically. And is used to bind dependencies.</remarks> </member> <member name="M:Svrooij.PowerShell.DI.DependencyCmdlet`1.StopProcessing"> <summary> You can call StopProcessing, but you cannot override it! </summary> <remarks>This is called by PowerShell if the user cancels the request. If is used to trigger the cancellationToken on <see cref="M:Svrooij.PowerShell.DI.DependencyCmdlet`1.ProcessRecordAsync(System.Threading.CancellationToken)"/>.</remarks> </member> <member name="M:Svrooij.PowerShell.DI.DependencyCmdlet`1.EndProcessing"> <summary> You can call EndProcessing, but you cannot override it! </summary> <remarks>This is called by PowerShell automatically.</remarks> </member> <member name="M:Svrooij.PowerShell.DI.ServiceProviderExtensions.BindDependencies(System.IServiceProvider,System.Object)"> <summary> Use reflection to find all properties and fields with the <see cref="T:Svrooij.PowerShell.DI.ServiceDependencyAttribute"/> and set the value of the property or field using the service provider. </summary> <param name="serviceProvider"><see cref="T:System.IServiceProvider"/> to use to resolve dependencies</param> <param name="obj">The object where the dependencies have to be set</param> <exception cref="T:System.ArgumentNullException">if required arguments are not set</exception> <exception cref="T:System.InvalidOperationException">if a required dependency is not found</exception>" </member> </members> </doc> |