@microsoft/windows-admin-center-sdk
Version:
Microsoft - Windows Admin Center Shell
65 lines (64 loc) • 2.1 kB
TypeScript
import { Observable } from 'rxjs';
import { AppContext } from './app-context';
import { HttpStatusCode } from './http-constants';
import { NodeRequestOptions } from './node-connection';
/**
* PowerShell Language mode values.
* https://learn.microsoft.com/en-us/dotnet/api/system.management.automation.pslanguagemode?view=powershellsdk-7.0.0
*/
export declare enum PSLanguageMode {
FullLanguage = 0,
RestrictedLanguage = 1,
NoLanguage = 2,
ConstrainedLanguage = 3
}
/**
* Represents the data returned from the psLanguageMode endpoint - /api/nodes/<node>/features/wdac/operations/psLanguageMode
*/
export interface PsLanguageModeResult {
/**
* Status of the request/response.
*/
status: HttpStatusCode;
/**
* PowerShell Language Mode of the target node.
*/
psLanguageMode: PSLanguageMode;
}
/**
* Windows Defender Application Control (WDAC) Constants.
*/
export declare class WdacConstants {
/**
* PowerShell Language mode API endpoint.
*/
static psLanguageModeUrl: string;
/**
* Wdac cache reset API endpoint.
*/
static resetWdacCacheUrl: string;
}
/**
* Windows Defender Application Control (WDAC) operations class.
*/
export declare class WdacOperations {
private appContext;
/**
* Initializes a new instance of the WdacOperations class.
*
* @param appContext the application context.
*/
constructor(appContext: AppContext);
/**
* Gets the PowerShell Language Mode of a specified targetNodeName.
* @param targetNodeName the machine name to get the WdacMode for.
* @param options the NodeRequestOptions for this API call.
*/
getPsLanguageMode(targetNodeName: string, options?: NodeRequestOptions): Observable<PsLanguageModeResult>;
/**
* Resets the WDAC cache of a specified targetNodeName.
* @param targetNodeName the machine name to reset the WDAC cache for.
* @param options the NodeRequestOptions for this API call.
*/
resetWdacCache(targetNodeName: string, options?: NodeRequestOptions): Observable<void>;
}