Category Archives: Windows Scripts

Sample Script to manage Windows

Powershell: Write XML files with UNIX line endings

Hi,

if you want to create XML files with powershell which can be used on UNIX/Linux systems you need to write an own save function. Ths save() methode of the System.XML.XMLDocument class can only write Windows style XML files with Carriage return/New line endings.
Continue reading Powershell: Write XML files with UNIX line endings

Windows: Check if computer is joined to Azure AD

Hi,

if you want to check if a computer is joined ADFS and/or Azure AD use
Continue reading Windows: Check if computer is joined to Azure AD

Powershell: Customize the prompt

Hi,

the default prompt of the powershell is “PS” and the current working directory:
Continue reading Powershell: Customize the prompt

Powershell: Run a (init) script when powershell starts

Hi,

if have some own aliases or functions defined which should be loaded when powershell starts you can create a startup script.
Continue reading Powershell: Run a (init) script when powershell starts

Windows: Working with the powershell command history

Hi,

like the UNIX bash shell, the Windows powershell also has a history which commands were executed.

Continue reading Windows: Working with the powershell command history