### Example Boot Event Collector Configuration XML Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md This XML snippet provides an example configuration file for the Boot Event Collector service. It defines collector settings, forwarder behavior (writing to ETL files), and specifies two target computers with their IP addresses, encryption keys, and names. ```XML ``` -------------------------------- ### Install Setup and Boot Event Collection Feature (DISM) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md Installs the Setup and Boot Event Collection optional feature on a Windows Server 2016 machine using the DISM command-line tool. This command enables the feature online and requires an elevated command prompt (like PowerShell). ```cmd dism /online /enable-feature /featurename:SetupAndBootEventCollection ``` -------------------------------- ### Examples of wdsutil start-transportserver command Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/windows-commands/wdsutil-start-transportserver.md Provides examples demonstrating how to start the Transport Server using the wdsutil command, including starting the local server and starting a specified server with verbose output. ```cli wdsutil /start-TransportServer wdsutil /verbose /start-TransportServer /Server:MyWDSServer ``` -------------------------------- ### Enabling Verbose Logging for Troubleshooting (XML Config) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md Add or modify the `minlog` attribute within the `` element of the configuration file to 'verbose' to enable detailed logging. This step is recommended during troubleshooting to get messages about every received packet and diagnose connection problems. ```XML ``` -------------------------------- ### Querying Network Adapters with PowerShell Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md Use this command to list network adapters on the target computer. Check the output for an adapter with the ServiceName 'kdnic' to verify the correct network adapter is being used for KDNET/EVENT-NET. ```PowerShell gwmi Win32_NetworkAdapter ``` -------------------------------- ### Checking for Boot Event Collector Feature (PowerShell) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md Uses DISM via PowerShell to list online features and filters the output to check if features related to "boot" (like the Boot Event Collector feature) are available on the current operating system version. This helps troubleshoot installation issues. ```PowerShell dism /online /get-features | ?{$_ -match boot} ``` -------------------------------- ### Restart Boot Event Collector Service using Command Prompt Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md These commands stop and then start the Boot Event Collector service using the `sc` utility in a standard Windows Command Prompt. This provides an alternative method to restart the service compared to using PowerShell. ```Batch sc stop BootEventCollector; sc start BootEventCollector ``` -------------------------------- ### Applying Configuration and Displaying Full Result Directly (PowerShell) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md This command combines reading the configuration file, applying it, and immediately piping the result to `Format-List` (`fl`) with the wildcard (`*`). This displays the full deployment result without needing to store it in a variable first. ```PowerShell Get-Content .\newconfig.xml | Set-SbecActiveConfig | fl * ``` -------------------------------- ### Displaying Full Configuration Deployment Result (PowerShell) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md After applying a new configuration and storing the result in the `$result` variable, pipe the variable to `Format-List` (`fl`) with the wildcard (`*`) to display all properties and their values from the result object. This provides a comprehensive view of the deployment outcome. ```PowerShell $result | fl * ``` -------------------------------- ### Viewing Collector Service Logs (Command Prompt) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md Queries and displays logs for the Boot Event Collector service using the wevtutil command-line tool. This provides an alternative method to view the service's administrative logs from a standard command prompt. ```Command Prompt wevtutil qe Microsoft-Windows-BootEvent-Collector/Admin ``` -------------------------------- ### Checking SbecForwarding Status with PowerShell Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md Run this command on the collector to check the status of the SbecForwarding service. It indicates whether the target computer has successfully connected without errors. ```PowerShell Get-SbecForwarding ``` -------------------------------- ### Install OpenSSH Client and Server (PowerShell) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/OpenSSH/OpenSSH_Install_FirstUse.md These commands install the OpenSSH Client and Server optional features using the Add-WindowsCapability cmdlet. The '-Online' parameter specifies that the installation should be performed on the running operating system. ```PowerShell # Install the OpenSSH Client Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0 # Install the OpenSSH Server Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0 ``` -------------------------------- ### Verify Boot Event Collector Service Status (PowerShell) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md Checks the status of services with 'boot' in their display name using the Get-Service cmdlet in PowerShell to confirm the Boot Event Collector service is running after installation. It should be running under the Network Service Account. ```powershell get-service -displayname *boot* ``` -------------------------------- ### Checking Boot Event Collector Connections (PowerShell) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md Execute this PowerShell cmdlet on the collector machine to list the current established connections from target computers. It also provides information about where the received data is being forwarded, helping verify if a target is successfully connecting. ```PowerShell Get-SbecForwarding ``` -------------------------------- ### Enabling AutoLoggers for Boot Events (PowerShell) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md Configures the Nano Server VHD registry to enable AutoLoggers for collecting typical setup and boot events. This cmdlet requires the path to the Nano Server VHD file. It adds specific registry keys necessary for event tracing. ```PowerShell Enable-SbecAutoLogger -Path C:\NanoServer\Workloads\IncludingWorkloads.vhd ``` -------------------------------- ### Enabling WinRM Quick Configuration - Command Prompt Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md This command initiates the quick configuration process for Windows Remote Management (WinRM) on the target computer. It sets up basic WinRM listeners and firewall rules, which is a prerequisite for remote management tasks like SBEC configuration. ```Command Prompt winrm quickconfig ``` -------------------------------- ### Start Multicast Transmission for Install Image (Basic) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/windows-commands/wdsutil-start-multicasttransmission.md Starts a multicast transmission for an install image named 'Vista with Office' using the basic syntax. ```cmd wdsutil /start-MulticastTransmissiomedia:Vista with Office /Imagetype:Install ``` -------------------------------- ### Flushing Sbec Buffers with PowerShell Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md Execute this command on the collector to manually flush the event buffers. This forces any buffered events to be written to the ETL file immediately, rather than waiting for the buffer to fill or the timeout to expire. ```PowerShell Save-SbecInstance ``` -------------------------------- ### List Boot Configuration Data Entries (Command Prompt) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md This command uses the bcdedit utility to list all entries in the Boot Configuration Data (BCD) store. It is used to validate the overall configuration of the target computer after making changes. Run from an elevated command prompt. ```Command Prompt bcdedit /enum ``` -------------------------------- ### Viewing Collector Service Logs (PowerShell) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md Retrieves logs for the Boot Event Collector service itself using the Get-WinEvent cmdlet in PowerShell. These logs are distinct from the collected boot and setup data and can be found under the specified log name. ```PowerShell Get-WinEvent -LogName Microsoft-Windows-BootEvent-Collector/Admin ``` -------------------------------- ### Start Multicast Transmission for Install Image (Full Options) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/windows-commands/wdsutil-start-multicasttransmission.md Starts a multicast transmission for an install image named 'Vista with Office' from 'ImageGroup1' on 'MyWDSServe', specifying the filename 'install.wim'. ```cmd wdsutil /start-MulticastTransmission /Server:MyWDSServemedia:Vista with Officemediatype:InstalmediaGroup:ImageGroup1 /Filename:install.wim ``` -------------------------------- ### Retrieving Boot Event Collector Logs (PowerShell) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md This PowerShell cmdlet retrieves events from the specified log name, Microsoft-Windows-BootEvent-Collector/Admin. It provides an alternative to `wevtutil` for accessing collector logs and supports additional parameters like `-Oldest` for chronological sorting. ```PowerShell Get-WinEvent -LogName Microsoft-Windows-BootEvent-Collector/Admin ``` -------------------------------- ### Querying Boot Event Collector Logs (Command Prompt) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md Use this command in an ordinary command prompt to query and display events logged by the Microsoft-Windows-BootEvent-Collector ETW provider from the Admin log channel. This is the primary method for checking collector events from the command line. ```Command Prompt wevtutil qe Microsoft-Windows-BootEvent-Collector/Admin ``` -------------------------------- ### List Boot Event Settings (Command Prompt) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md This command uses the bcdedit utility to list the current boot event settings. It is used to validate specific event collection parameters like Key, Debugtype, Hostip, Port, and DHCP after configuration. Run from an elevated command prompt. ```Command Prompt bcdedit /eventsettings ``` -------------------------------- ### Redirecting Verbose Logs to File for Troubleshooting (XML Config) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md This configuration snippet shows how to set the log level to 'verbose' and simultaneously redirect the output to a file. This is useful when verbose logging generates a large amount of data that is difficult to view in the standard event log system. ```XML ``` -------------------------------- ### Importing BootEventCollector Module (PowerShell) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md Imports the BootEventCollector PowerShell module, which is required to run the cmdlets for configuring Nano Server and BCD settings for boot event collection. This module must be copied to the collector computer's PowerShell modules directory first. ```PowerShell Import-Module BootEventCollector ``` -------------------------------- ### Accessing Configuration Deployment Information (PowerShell) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md After applying a new configuration and storing the result in the `$result` variable, access the `.InfoString` property to retrieve informational details about the configuration deployment process. This property can provide insights into the applied configuration. ```PowerShell $result.InfoString ``` -------------------------------- ### Examples of wdsutil start-Server Command Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/windows-commands/wdsutil-start-server.md Provides examples demonstrating how to use the wdsutil start-Server command to start the local WDS server or a specified remote WDS server with verbose output. ```Command Prompt wdsutil /start-Server wdsutil /verbose /start-Server /Server:MyWDSServer ``` -------------------------------- ### Configuring BCD Event Settings Locally - Command Prompt Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md This command configures the network settings for BCD event logging on the local computer. It specifies the collector's host IP, port, and the required encryption key for communication with the SBEC collector. ```Command Prompt bcdedit /eventsettings net hostip:1.2.3.4 port:50000 key:a.b.c.d ``` -------------------------------- ### Example: Install TAPI Application Directory Partition with tapicfg Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/windows-commands/tapicfg-install.md This example demonstrates how to use `tapicfg install` to create a TAPI application directory partition named `tapifiction.testdom.microsoft.com` on the domain controller `testdc.testdom.microsoft.com` and set it as the default partition for the domain. ```cmd tapicfg install /directory:tapifiction.testdom.microsoft.com /server:testdc.testdom.microsoft.com /forcedefault ``` -------------------------------- ### Installing Windows Roles and Features via PowerShell Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/storage/storage-spaces/deploy-storage-spaces-direct.md Installs a list of specified Windows Server roles and features on the local server using the `Install-WindowsFeature` cmdlet. This is used to install components like Hyper-V, Failover Clustering, etc. ```PowerShell Install-WindowsFeature -Name "Hyper-V", "Failover-Clustering", "Data-Center-Bridging", "RSAT-Clustering-PowerShell", "Hyper-V-PowerShell", "FS-FileServer" ``` -------------------------------- ### Testing WinRM Connection (Same Domain) - PowerShell Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md This command tests the ability to establish and immediately close a remote PowerShell session to a target computer within the same domain. A lack of output indicates a successful connection test. ```PowerShell New-PSSession -Computer | Remove-PSSession ``` -------------------------------- ### Enabling SBEC Autologger Remotely - PowerShell Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md This command enables the Setup and Boot Event Collection (SBEC) autologger on a remote target computer. This configures the system to send ETW events through the previously configured transport. ```PowerShell Enable-SbecAutologger -ComputerName ``` -------------------------------- ### Enable Boot Debugging (Command Prompt) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md This command uses the bcdedit utility to enable boot debugging. It is mentioned in the context of validating configuration and noting that it is mutually exclusive with enabling event collection (`bcdedit /event`). Run from an elevated command prompt. ```Command Prompt bcdedit /debug ``` -------------------------------- ### Configure Event Settings with Bus Params (Command Prompt) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md This command configures boot event settings using the bcdedit utility from an elevated command prompt. It sets the host IP, port, encryption key, and the bus parameters (X.Y.Z) for the network adapter used for event forwarding. ```Command Prompt bcdedit /eventsettings net hostip:aaa port:50000 key:bbb busparams:X.Y.Z ``` -------------------------------- ### Setting WinRM Trusted Hosts - PowerShell Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md This command configures the WinRM client on the collector computer to trust specified target hosts. This is necessary when the target computers are not in the same domain as the collector computer for remote management. ```PowerShell Set-Item -Force WSMan:\localhost\Client\TrustedHosts ,,... ``` -------------------------------- ### Enable Boot Event Collection (Command Prompt) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md This command uses the bcdedit utility to enable boot event collection. It is mentioned in the context of validating configuration and noting that it is mutually exclusive with enabling debugging (`bcdedit /debug`). Run from an elevated command prompt. ```Command Prompt bcdedit /event ``` -------------------------------- ### Recovering Volume by GUID using wbadmin (cmd) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/windows-commands/wbadmin-start-recovery.md Provides an example of recovering a volume identified by its GUID from a specific backup version using the `wbadmin start recovery` command. ```cmd wbadmin start recovery -version:03/31/2020-09:00 -itemType:Volume -items:\\?\Volume{cc566d14-44a0-11d9-9d93-806e6f6e6963}\\ ``` -------------------------------- ### Setting Collector Log Level to Debug and Output to File (XML Config) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md This XML configuration snippet demonstrates setting the collector's minimum log level to 'debug' and redirecting the log output to a specific file path. The debug level provides maximum detail, including packet contents, and writing to a file helps manage large log volumes. ```XML ``` -------------------------------- ### Retrieving Boot Event Collector Connection History (PowerShell) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md Use this PowerShell cmdlet to view the recent history of status changes for connections managed by the Boot Event Collector. This provides insight into past connection events, which can be helpful for diagnosing intermittent issues. ```PowerShell Get-SbecHistory ``` -------------------------------- ### Enabling BCD Events Locally - Command Prompt Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md This command enables event logging within the Boot Configuration Data (BCD) store on the local computer. This is a prerequisite for configuring BCD event settings for SBEC. ```Command Prompt bcdedit /event yes ``` -------------------------------- ### View schtasks create examples (cmd) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/windows-commands/schtasks-create.md Displays help and examples for the `schtasks /create` command directly in the command prompt. ```cmd schtasks /create /? ``` -------------------------------- ### Check Active Boot Event Collector Configuration using PowerShell Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md This PowerShell command retrieves the currently active configuration for the Boot Event Collector service using the `Get-SbecActiveConfig` cmdlet and displays its text content. ```PowerShell (Get-SbecActiveConfig).text ``` -------------------------------- ### Get Device Info by GUID using wdsutil Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/windows-commands/wdsutil-get-device.md Example illustrating how to retrieve information for a prestaged computer using its GUID string, including the /verbose flag and specifying a forest-wide search. ```cmd wdsutil /verbose /Get-Device /ID:E8A3EFAC-201F-4E69-953-B2DAA1E8B1B6 /forest:Yes ``` -------------------------------- ### Enabling SBEC BCD Settings Remotely - PowerShell Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md This command enables Setup and Boot Event Collection (SBEC) settings in the Boot Configuration Data (BCD) store on a remote target computer. It requires specifying the target computer name, collector IP address, collector port, and an encryption key. ```PowerShell Enable-SbecBcd -ComputerName -CollectorIP -CollectorPort -Key ``` -------------------------------- ### Restart Boot Event Collector Service using PowerShell Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md This PowerShell command restarts the Boot Event Collector service using the `Restart-Service` cmdlet. This can be used to apply configuration changes or troubleshoot issues if the automatic update fails. ```PowerShell Restart-Service BootEventCollector ``` -------------------------------- ### Apply Boot Event Collector Configuration using PowerShell Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md This PowerShell command reads the content of a new configuration file (`newconfig.xml`) and applies it to the Boot Event Collector service using the `Set-SbecActiveConfig` cmdlet. It stores the result in a variable `$result` for checking the success status. ```PowerShell $result = (Get-Content .\newconfig.xml | Set-SbecActiveConfig); $result ``` -------------------------------- ### Allowing Unencrypted WinRM Communication - PowerShell Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md This command configures the WinRM client on the collector computer to allow unencrypted communication. This is used in conjunction with TrustedHosts for cross-domain scenarios, but is strongly discouraged outside of secure lab environments due to security risks. ```PowerShell Set-Item -Force WSMan:\localhost\Client\AllowUnencrypted true ``` -------------------------------- ### Setting Collector Minimum Log Level to Verbose (XML Config) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md This XML snippet shows how to configure the Boot Event Collector to set the minimum logging level to 'verbose'. This is done within the `` element of the configuration file and increases the detail of logs, useful for diagnosing connection issues. ```XML ``` -------------------------------- ### Configuring BCD for Boot Event Collection (PowerShell) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md Updates the Boot Configuration Data (BCD) settings within the Nano Server VHD to enable the Events flag and specify the collector computer's details. This ensures diagnostic events are directed to the correct server using the provided IP address, port, and encryption key. ```PowerShell Enable-SbecBcd -Path C:\NanoServer\Workloads\IncludingWorkloads.vhd -CollectorIp 192.168.100.1 -CollectorPort 50000 -Key a.b.c.d ``` -------------------------------- ### Accessing Configuration Deployment Warnings (PowerShell) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md After applying a new configuration and storing the result in the `$result` variable, access the `.WarningString` property to retrieve any warning messages generated during the deployment process. Warnings indicate potential issues but do not necessarily prevent the configuration from being applied. ```PowerShell $result.WarningString ``` -------------------------------- ### Testing WinRM Connection (Different Domain) - PowerShell Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md This command tests the ability to establish and immediately close a remote PowerShell session to a target computer in a different domain. It prompts for administrator credentials on the target computer. A lack of output indicates a successful connection test. ```PowerShell New-PSSession -Computer -Credential Administrator | Remove-PSSession ``` -------------------------------- ### Example: Create System State Backup to Volume F Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/windows-commands/wbadmin-start-systemstatebackup.md Provides an example of using the wbadmin start systemstatebackup command to create a system state backup and store it on the volume assigned the drive letter 'f:'. ```Windows Command Prompt wbadmin start systemstatebackup -backupTarget:f: ``` -------------------------------- ### Starting System Recovery from Local Drive using wbadmin Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/windows-commands/wbadmin-start-sysrecovery.md Provides an example of using the `wbadmin start sysrecovery` command to begin a system recovery operation. This specific example targets a backup located on a local drive (d:) and specifies the exact version identifier of the backup to be restored. ```cmd wbadmin start sysrecovery -version:03/31/2020-09:00 -backupTarget:d: ``` -------------------------------- ### Example: Install Windows Server 2022 Datacenter GVLK Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/get-started/kms-client-activation-keys.md An example demonstrating how to use the slmgr command to install the specific GVLK for Windows Server 2022 Datacenter Edition. This command is run from an administrative command prompt after identifying the correct GVLK from the provided tables. ```cmd slmgr /ipk WX4NM-KYWYW-QJJR4-XV3QB-6VM33 ``` -------------------------------- ### Example Output of Netsh Help Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/networking/technologies/netsh/netsh-contexts.md This is a sample output displayed after running `netsh /?` or `netsh help`. It lists the main commands available at the top level and the sub-contexts that can be entered for more specific configurations. ```text The following commands are available: Commands in this context: .. - Goes up one context level. ? - Displays a list of commands. abort - Discards changes made while in offline mode. add - Adds a configuration entry to a list of entries. advfirewall - Changes to the `netsh advfirewall' context. alias - Adds an alias. branchcache - Changes to the `netsh branchcache' context. bridge - Changes to the `netsh bridge' context. bye - Exits the program. commit - Commits changes made while in offline mode. delete - Deletes a configuration entry from a list of entries. dhcpclient - Changes to the `netsh dhcpclient' context. dnsclient - Changes to the `netsh dnsclient' context. dump - Displays a configuration script. exec - Runs a script file. exit - Exits the program. firewall - Changes to the `netsh firewall' context. help - Displays a list of commands. http - Changes to the `netsh http' context. interface - Changes to the `netsh interface' context. ipsec - Changes to the `netsh ipsec' context. ipsecdosprotection - Changes to the `netsh ipsecdosprotection' context. lan - Changes to the `netsh lan' context. namespace - Changes to the `netsh namespace' context. netio - Changes to the `netsh netio' context. offline - Sets the current mode to offline. online - Sets the current mode to online. popd - Pops a context from the stack. pushd - Pushes current context on stack. quit - Exits the program. ras - Changes to the `netsh ras' context. rpc - Changes to the `netsh rpc' context. set - Updates configuration settings. show - Displays information. trace - Changes to the `netsh trace' context. unalias - Deletes an alias. wfp - Changes to the `netsh wfp' context. winhttp - Changes to the `netsh winhttp' context. winsock - Changes to the `netsh winsock' context. The following sub-contexts are available: advfirewall branchcache bridge dhcpclient dnsclient firewall http interface ipsec ipsecdosprotection lan namespace netio ras rpc trace wfp winhttp winsock To view help for a command, type the command, followed by a space, and then type ?. ``` -------------------------------- ### Getting Detailed bitsadmin Job Info using /info Batch Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/windows-commands/bitsadmin-examples.md Retrieves detailed information for a specific BITS job (identified by name or GUID). The output includes state, progress, owner, timestamps, error details, and file list. ```Batch bitsadmin /info ``` -------------------------------- ### Applying New Boot Event Collector Configuration and Storing Result (PowerShell) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md This PowerShell command reads an XML configuration file (`newconfig.xml`), applies it to the Boot Event Collector using `Set-SbecActiveConfig`, and stores the result object in the `$result` variable. The result object contains information about the success or failure of the configuration deployment. ```PowerShell $result = (Get-Content .\newconfig.xml | Set-SbecActiveConfig); $result ``` -------------------------------- ### Getting Job Owner with bitsadmin in cmd Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/windows-commands/bitsadmin-getowner.md Use the bitsadmin /getowner command to retrieve the owner of a specific BITS job. This command requires the job's display name or GUID as a parameter. The example shows how to get the owner for a job named 'myDownloadJob'. ```cmd bitsadmin /getowner myDownloadJob ``` -------------------------------- ### Add Device using GUID and Advanced Options (wdsutil) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/windows-commands/wdsutil-add-device.md Shows a more complex example of pre-staging a computer using its GUID string, including specifying a referral server, boot program, unattend file, user rights, boot image path, and organizational unit. ```Command Line wdsutil /add-Device /Device:computer1 /ID:{E8A3EFAC-201F-4E69-953F-B2DAA1E8B1B6} /ReferralServer:WDSServer1 /BootProgram:boot\x86\pxeboot.com/WDSClientUnattend:WDSClientUnattend\unattend.xml /User:Domain\MyUser/JoinRights:Full /BootImagepath:boot\x86\images\boot.wim /OU:OU=MyOU,CN=Test,DC=Domain,DC=com ``` -------------------------------- ### Installing a Protocol using netcfg (Command Line) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/windows-commands/netcfg.md This command installs a network protocol component using a specified INF file. The /l parameter provides the path to the INF file, /c p specifies the component class as 'protocol', and /i example provides the component ID. ```cmd netcfg /l c:\oemdir\example.inf /c p /i example ``` -------------------------------- ### Starting a Service using NET START - Windows Command Prompt Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/server-core/server-core-administer.md This command starts a specified service using the NET command. Replace with the actual name of the service. ```Windows Command Prompt net start ``` -------------------------------- ### Accessing Configuration Deployment Errors (PowerShell) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md After applying a new configuration and storing the result in the `$result` variable, access the `.ErrorString` property to retrieve any error messages that occurred during the deployment process. If this property contains text, the new configuration was not applied. ```PowerShell $result.ErrorString ``` -------------------------------- ### Configuring WinRM Trusted Hosts and Unencrypted - Command Prompt Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md This command configures the WinRM client on the collector computer to trust specified target hosts and allow unencrypted communication using the `winrm set` command. This is an alternative to the PowerShell commands for cross-domain scenarios, but allowing unencrypted communication is not recommended outside of lab environments. ```Command Prompt winrm set winrm/config/client @{TrustedHosts=,,...;AllowUnencrypted=true} ``` -------------------------------- ### Start Windows Admin Center Service PowerShell Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/manage/windows-admin-center/deploy/install.md This PowerShell command starts the Windows Admin Center service by its name. This step may be necessary after installation to ensure the service is running. ```powershell Start-Service -Name WindowsAdminCenter ``` -------------------------------- ### Configure SBEC Event Forwarding with Bus Params (PowerShell) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/Get-started-with-Setup-and-Boot-Event-Collection.md This command configures System Boot Event Collector (SBEC) event forwarding settings using Windows PowerShell. It specifies the collector's IP and port, an encryption key, and the bus parameters (X.Y.Z) of the network adapter to use for forwarding events. Requires an elevated PowerShell prompt. ```PowerShell Enable-SbecBcd -ComputerName -CollectorIP -CollectorPort -Key -BusParams ``` -------------------------------- ### Example PowerShell Script for Node Installation Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/manage/windows-admin-center/extend/guides/install-on-node.md This is an example PowerShell script (`installNode.ps1`) that resides in the extension's Node folder. It is automatically copied to the managed node and executed by the Windows Admin Center API. Custom installation logic for the extension payload should be added within this script. ```PowerShell # Add logic for installing payload on managed node echo 'Success' ``` -------------------------------- ### Installing Additional (Replica) Domain Controller with Detailed Configuration Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/identity/ad-ds/deploy/Install-Active-Directory-Domain-Services--Level-100-.md Use the Install-ADDSDomainController cmdlet to install an additional domain controller with specific configurations. This example uses specified credentials, creates a DNS delegation, installs a writable DC and global catalog server in a site, installs from media, sets database, SYSVOL, and log paths, automatically restarts the server, and prompts for the DSRM password. ```powershell Install-ADDSDomainController -Credential (Get-Credential CONTOSO\EnterpriseAdmin1) -CreateDNSDelegation -DomainName corp.contoso.com -SiteName Boston -InstallationMediaPath "c:\ADDS IFM" -DatabasePath "d:\NTDS" -SYSVOLPath "d:\SYSVOL" -LogPath "e:\Logs" ``` -------------------------------- ### Joining Server to Domain via PowerShell Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/storage/storage-spaces/deploy-storage-spaces-direct.md Joins a server to an Active Directory domain, sets a new computer name, and uses specified domain credentials for the join operation. The server is restarted automatically after joining. ```PowerShell Add-Computer -NewName "Server01" -DomainName "contoso.com" -Credential "CONTOSO\User" -Restart -Force ``` -------------------------------- ### Syntax for wdsutil start-MulticastTransmission Install Image (Windows Server 2008 R2) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/windows-commands/wdsutil-start-multicasttransmission.md Defines the command-line syntax for starting a Scheduled-Cast transmission of an install image on Windows Server 2008 R2. ```cmd wdsutil [Options] /start-MulticastTransmissiomedia: [/Server:] mediatype:Install mediaGroup:] [/Filename:] ``` -------------------------------- ### Starting a Service using SC START - Windows Command Prompt Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/server-core/server-core-administer.md This command starts a specified service using the Service Control (SC) utility. Replace with the actual name of the service. ```Windows Command Prompt sc start ``` -------------------------------- ### Example: Create Solution Extension Project Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/manage/windows-admin-center/extend/develop-solution.md A concrete example demonstrating the usage of the `wac create` command with placeholder values for company, solution, and tool names. ```Shell wac create --company "Contoso Inc" --solution "Contoso Foo Works Suite" --tool "Manage Foo Works" ``` -------------------------------- ### Check OpenSSH Capability Status (PowerShell) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/OpenSSH/OpenSSH_Install_FirstUse.md This command checks the availability and installation state of OpenSSH Client and Server capabilities on the system using the Get-WindowsCapability cmdlet. It filters the results to show only capabilities with names matching 'OpenSSH*'. ```PowerShell Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH*' ``` -------------------------------- ### Syntax for the start command (cmd) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/windows-commands/start.md This snippet shows the complete syntax for the Windows start command, detailing the various parameters available to control how a program or command is launched, including window title, startup directory, priority, affinity, and waiting behavior. ```cmd start <"title"> [/d ] [/i] [{/min | /max}] [{/separate | /shared}] [{/low | /normal | /high | /realtime | /abovenormal | /belownormal}] [/node ] [/affinity ] [/wait] [/b] [/machine ] [ [... ] | [... ]] ``` -------------------------------- ### Starting Data Collection using LOGMAN START - Windows Command Prompt Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/server-core/server-core-administer.md This command starts data collection for a specified data collector set using the LOGMAN utility. ```Windows Command Prompt logman start ``` -------------------------------- ### Syntax for wdsutil start-transportserver command Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/windows-commands/wdsutil-start-transportserver.md Shows the general syntax for the wdsutil start-transportserver command, including optional parameters like /Options and /Server. ```cli wdsutil [Options] /start-TransportServer [/Server:] ``` -------------------------------- ### Installing Additional (Replica) Domain Controller Prompting for Domain Name Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/identity/ad-ds/deploy/Install-Active-Directory-Domain-Services--Level-100-.md Use the Install-ADDSDomainController cmdlet to install an additional domain controller. This example prompts the user to provide the domain name to promote the server into using Read-Host. ```powershell Install-ADDSDomainController -Credential (Get-Credential) -DomainName (Read-Host "Domain to promote into") ``` -------------------------------- ### Retrieving bitsadmin Help Example Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/windows-commands/bitsadmin-help.md Provides a specific example of how to use the bitsadmin command with the /help switch to display command-line usage details. ```Command Prompt bitsadmin /help ``` -------------------------------- ### Initialize WDS Server with Verbose Output and Remote Install Path on C Drive (cmd) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/windows-commands/wdsutil-initialize-server.md Example showing how to initialize a specific Windows Deployment Services server (`MyWDSServer`) with verbose output and progress indication, setting the remote install shared folder path to the C: drive. ```cmd wdsutil /verbose /Progress /Initialize-Server /Server:MyWDSServer /remInst:C:\remoteInstall ``` -------------------------------- ### Example: Show Pending Changes from DC4 to DC2 (Repadmin) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/identity/ad-ds/get-started/virtual-dc/Virtualized-Domain-Controller-Deployment-and-Configuration.md An example demonstrating the use of repadmin /showchanges to list specific pending replication changes from a source DC (identified by GUID) to a partner DC (dc2.corp.contoso.com) within a specific naming context. ```Command Prompt repadmin /showchanges dc2.corp.contoso.com 5d083398-4bd3-48a4-a80d-fb2ebafb984f dc=corp,dc=contoso,dc=com ``` -------------------------------- ### Previewing Installation/Removal from Answer File - servermanagercmd - Command Line Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/windows-commands/servermanagercmd.md This command illustrates how to use `servermanagercmd` with an XML answer file (`install.xml`) specified by `-inputpath`. The `-whatif` parameter is included to preview the operations (installation or removal) defined in the answer file without actually executing them. ```Command Line servermanagercmd -inputpath install.xml -whatif ``` -------------------------------- ### Examples of wdsutil uninitialize-server Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/windows-commands/wdsutil-uninitialize-server.md Provides examples demonstrating how to use the wdsutil uninitialize-server command, including uninitializing the local server and uninitializing a specified remote server with verbose output. ```Command Line wdsutil /Uninitialize-Server wdsutil /verbose /Uninitialize-Server /Server:MyWDSServer ``` -------------------------------- ### Example of Deleting BITS Cache Entry with GUID (Windows Command Prompt) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/windows-commands/bitsadmin-cache-and-delete.md Provides a practical example of how to use the `bitsadmin /cache /delete` command to remove a specific cache entry. The example uses a placeholder GUID `{6511FB02-E195-40A2-B595-E8E2F8F47702}` to demonstrate the command usage. ```Windows Command Prompt bitsadmin /cache /delete {6511FB02-E195-40A2-B595-E8E2F8F47702} ``` -------------------------------- ### Starting OpenSSH Server Service (PowerShell) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/OpenSSH/OpenSSH_Install_FirstUse.md This command starts the sshd service, which is the OpenSSH server daemon. This is necessary for the server to listen for incoming SSH connections. It uses the Start-Service cmdlet. ```powershell # Start the sshd service Start-Service sshd ``` -------------------------------- ### Adding and Installing Driver Package pnputil cmd Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/windows-commands/pnputil.md Illustrates how to add a driver package to the store and immediately install it using both the '-a' (add) and '-i' (install) parameters, followed by the path to the INF file. ```cmd pnputil.exe -i -a a:\usbcam\USBCAM.INF ``` -------------------------------- ### Creating WAC Tool Extension Project (Example) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/manage/windows-admin-center/extend/develop-gateway-plugin.md This is an example of the `wac create` command using placeholder names 'Contoso Inc' for the company and 'Manage Foo Works' for the tool. This command initializes the project structure and configuration. ```bash wac create --company "Contoso Inc" --tool "Manage Foo Works" ``` -------------------------------- ### Installing Role with Results Output - servermanagercmd - Command Line Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/windows-commands/servermanagercmd.md This example shows how to install the 'Web Server (IIS)' role using `servermanagercmd -install Web-Server`. It also uses the `-resultpath` parameter to save the outcome of the installation process to a specified XML file named `installResult.xml`. ```Command Line servermanagercmd -install Web-Server -resultpath installResult.xml ``` -------------------------------- ### Example: Assign and Verify GPU Partition (PowerShell) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/virtualization/hyper-v/partition-assign-vm-gpu.md Provides a complete example demonstrating how to assign a GPU partition to a specific VM named 'mytestgpu-vm1' and then immediately verify the assignment by listing the partition details. ```PowerShell $VMname = "mytestgpu-vm1" Add-VMGpuPartitionAdapter -VMName $VMName Get-VMGpuPartitionAdapter -VMName $VMName | FL InstancePath,PartitionId,PartitionVfLuid ``` -------------------------------- ### Enter Windows Product Key using Slmgr.vbs (CMD) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/server-core/server-core-administer.md Uses the `slmgr.vbs` script to install a product key. ```cmd slmgr.vbs –ipk ``` -------------------------------- ### WDSUTIL: Example - Set Install Image Attributes Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/windows-commands/wdsutil-set-image.md Shows practical examples of using the `wdsutil set-image` command to update attributes for a WDS install image. Examples demonstrate setting the description and using options like server name, image group, filename, new name, user filter (SDDL), enabled status, and associating/overwriting an unattend file. ```cmd wdsutil /Set-Image /Image:"Windows Vista with Office" /mediatype:Install /Description:"New description" wdsutil /verbose /Set-Image /Image:"Windows Vista with Office" /Server:MyWDSServer /mediatype:Install /ImageGroup:ImageGroup1 /Filename:install.wim /Name:"New name" /Description:"New description" /UserFilter:O:BAG:DUD:AI(A;ID;FA;;;SY)(A;ID;FA;;;BA)(A;ID;0x1200a9;;;AU) /Enabled:Yes /UnattendFile:\\server\share\unattend.xml /OverwriteUnattend:Yes ``` -------------------------------- ### Get Install Images with wdsutil Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/windows-commands/wdsutil-get-allimages.md This command retrieves information specifically about install images stored on the local Windows Deployment Services server. It uses the `/show:install` parameter to filter the results. ```cmd wdsutil /get-allimages /show:install ``` -------------------------------- ### Starting SIL Aggregator (PowerShell) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/software-inventory-logging/software-inventory-logging-aggregator.md Starts all Software Inventory Logging Aggregator services and tasks. This is required for the Aggregator to receive data over HTTPS from servers with SIL Logging started. ```PowerShell Start-SilAggregator ``` -------------------------------- ### Install Connection Manager Profile without Support Files - Batch Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/windows-commands/cmstp.md This example demonstrates how to install the 'fiction' service profile using Syntax 1, specifically excluding the installation of associated support files by using the /nf parameter. ```Batch fiction.exe /c:cmstp.exe fiction.inf /nf ``` -------------------------------- ### Example: Show AD Replication Partners for DC4 (Repadmin) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/identity/ad-ds/get-started/virtual-dc/Virtualized-Domain-Controller-Deployment-and-Configuration.md An example demonstrating the use of repadmin /showrepl to list replication partners for a specific domain controller, dc4.corp.contoso.com. ```Command Prompt repadmin.exe /showrepl dc4.corp.contoso.com /repsto ``` -------------------------------- ### Starting System Recovery from Network Share using wbadmin Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/windows-commands/wbadmin-start-sysrecovery.md Illustrates how to use the `wbadmin start sysrecovery` command to perform a system recovery from a backup stored on a network shared folder. This example includes specifying the backup version, the network share path as the backup target, and the machine name for which the backup was created. ```cmd wbadmin start sysrecovery -version:04/30/2020-09:00 -backupTarget:\\servername\share -machine:server01 ``` -------------------------------- ### Syntax for wdsutil initialize-server Command Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/windows-commands/wdsutil-initialize-server.md Shows the general syntax for the `wdsutil initialize-server` command, including optional parameters for specifying the server name, the required remote install folder path, and an optional flag to authorize the server in DHCP. ```cmd wdsutil /Initialize-Server [/Server:] /remInst: [/Authorize] ``` -------------------------------- ### Installing Failover Clustering Feature (PowerShell) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/networking/sdn/manage/guest-clustering.md Installs the Windows Failover Clustering feature and its management tools, then imports the necessary PowerShell module to manage clusters. This is a prerequisite for creating and managing failover clusters. ```PowerShell add-windowsfeature failover-clustering -IncludeManagementTools Import-module failoverclusters $ClusterName = "MyCluster" $ClusterNetworkName = "Cluster Network 1" $IPResourceName = $ILBIP = "192.168.2.100" $nodes = @("DB1", "DB2") ``` -------------------------------- ### Starting a Hyper-V Daemon (Bash) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/virtualization/hyper-v/manage/Manage-Hyper-V-integration-services.md This command starts a specific Hyper-V integration service daemon process. It requires root permissions ("sudo") as these daemons typically run as root. The example shows starting the "hv_kvp_daemon". ```bash sudo hv_kvp_daemon ``` -------------------------------- ### Example: Creating New Startup Key with manage-bde changekey (Command Prompt) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/windows-commands/manage-bde-changekey.md Provides an example of using the manage-bde changekey command to create a new startup key. This specific example creates a new startup key on drive E: for use with BitLocker encryption on drive C:. ```Command Prompt manage-bde -changekey C: E:\ ``` -------------------------------- ### Installing Additional (Replica) Domain Controller using PowerShell Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/identity/ad-ds/deploy/Install-Active-Directory-Domain-Services--Level-100-.md Use the Install-ADDSDomainController cmdlet to install an additional domain controller. This example installs a domain controller and DNS server in the corp.contoso.com domain and prompts the user to supply the domain Administrator credentials and the DSRM password. ```powershell Install-ADDSDomainController -Credential (Get-Credential CORP\Administrator) -DomainName "corp.contoso.com" ``` -------------------------------- ### Additional DC Installation Options (Install From Media) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/identity/ad-ds/deploy/dcpromo.md Configuration options specifically for installing an additional domain controller using the Install From Media (IFM) method, requiring specification of the replication source path in addition to standard options. ```txt [DCINSTALL] UserName= Password= UserDomain= DatabasePath="" LogPath="" SYSVOLPath="" SafeModeAdminPassword= CriticalReplicationOnly=no SiteName= This site must be created in advance in the Dssites.msc snap-in. ReplicaOrNewDomain=replica ReplicaDomainDNSName= ReplicationSourceDC= ReplicationSourcePath= RebootOnCompletion=yes ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/manage/windows-admin-center/extend/develop-solution.md Navigate into the newly created project directory and run `npm install` to download and set up the required local Node.js dependencies for the extension. ```Shell npm install ``` -------------------------------- ### Example FreeBSD /etc/fstab with GEOM Labels Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/virtualization/hyper-v/Best-practices-for-running-FreeBSD-on-Hyper-V.md Shows the structure of the `/etc/fstab` file after replacing conventional device names with GEOM labels for mounting file systems. ```Configuration # Device Mountpoint FStype Options Dump Pass# /dev/label/rootfs / ufs rw 1 1 /dev/label/swap none swap sw 0 0 ``` -------------------------------- ### Retrieve BITS Helper Token SID - Batch Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/windows-commands/bitsadmin-gethelpertokensid.md This command retrieves the Security Identifier (SID) of the helper token associated with a specified BITS transfer job. It requires the job's display name or GUID as an argument. This example shows how to get the SID for a job named 'myDownloadJob'. ```Batch bitsadmin /gethelpertokensid myDownloadJob ``` -------------------------------- ### Start Hyper-V VM (PowerShell) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/networking/sdn/manage/Create-a-Tenant-VM.md This simple command retrieves the specified virtual machine object and starts it. ```PowerShell Get-VM -Name "MyVM" | Start-VM ``` -------------------------------- ### Install DFS Replication and Management Tools using PowerShell Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/storage/dfs-replication/dfsr-overview.md This command installs both the core DFS Replication service (FS-DFS-Replication) and the DFS Management Tools (RSAT-DFS-Mgmt-Con) using the Install-WindowsFeature cmdlet. This is typically required for a full DFS Replication setup. ```powershell Install-WindowsFeature "FS-DFS-Replication", "RSAT-DFS-Mgmt-Con" ``` -------------------------------- ### Initialize WDS Server with Remote Install Path on F Drive (cmd) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/windows-commands/wdsutil-initialize-server.md Example demonstrating how to initialize the local Windows Deployment Services server using the `wdsutil initialize-server` command, specifying the remote install shared folder path on the F: drive. ```cmd wdsutil /Initialize-Server /remInst:F:\remoteInstall ``` -------------------------------- ### Install Windows Features on Servers (PowerShell) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/storage/storage-spaces/deploy-storage-spaces-direct.md Uses the Invoke-Command cmdlet to execute the Install-WindowsFeature cmdlet on a list of remote servers specified in the $ServerList variable. It installs features defined in the $Featurelist variable, utilizing the 'Using' scope modifier to pass the variable value into the remote session. ```PowerShell Invoke-Command ($ServerList) { Install-WindowsFeature -Name $Using:Featurelist } ``` -------------------------------- ### Starting Cluster Resources (PowerShell) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/networking/sdn/manage/guest-clustering.md Starts the 'Cluster IP Address' and 'Cluster Name' resources within the failover cluster, waiting up to 60 seconds for each to come online. This makes the cluster network resources active. ```PowerShell Start-ClusterResource "Cluster IP Address" -Wait 60 Start-ClusterResource "Cluster Name" -Wait 60 ``` -------------------------------- ### Launch SConfig from CMD (Deprecated) Source: https://github.com/microsoftdocs/windowsserverdocs/blob/main/WindowsServerDocs/administration/server-core/server-core-sconfig.md Describes how to start the Server Configuration tool (SConfig) by running its command from a Command Prompt window. This method is no longer recommended and is deprecated in recent Windows Server versions. ```CMD SConfig.cmd ```