Mindblown: a blog about philosophy.
-
How to use the Get-Date command
The command Get-Date returns the current date and time of the system, and the result is shown in the form of long-date and long-time formats. If we use a Format-List cmdlet with Get-Date, we will see the full information that returns various dates and time formats. The command Get-Date returns a DateTime object. Let see the output of using the Get-Date | Format-List cmdlet:…
-
Date Formatting Parameters
Followings are the different types of date format in PowerShell: When to use Get-Date The Get-Date command returns a DateTime object that shows the current date or date you specify on your local device. Let’s see the default format of the system when we use the Get-Date command. The Get-Date command returns a date and time value in string…
-
Step 3:
Step 3: The above command asks you to open Windows PowerShell as an administrator mode; click OK to allow, and it will bring the Windows PowerShell to the administrator.
-
Run PowerShell as an Administrator using Run window – Step 2:
Based on the search result, right-click on the Windows PowerShell and Run as Administrator. It will take you to Windows PowerShell’s as administrator mode. 2. Run PowerShell as an Administrator using Run window Step 1: Press the Windows + R keys simultaneously, and it will open a Run dialog box. Now, type the PowerShell in the Run dialog box and click on the OK button.…
-
PowerShell Get-Date Format
In this article, we will discuss and use PowerShell’s Get-Date Format (or Date Format) command. Date and times properties are used several times throughout the PowerShell scripts. Using the Get-Date cmdlet, we can retrieve the current date of our machine. The default format of date is defined on the local system on which we run the command. There are several…
-
DSC Resources
The resources of desired state configuration provide the building blocks for the DSC configuration. The following are the basic built-in configuration resources of the Desired State Configuration: DSC Local Configuration Manager (LCM) It is an engine of Desired State Configuration. The Local Configuration Manager is responsible for enacting and parsing configurations which are sent to…
-
DSC Configurations
DSC Configurations are the scripts of PowerShell, which define a special type of function. We use the keyword Configuration to define the configuration. Syntax of DSC Configuration The configuration script consists of the following parts: Example: In this example, we can specify the name of the node by passing the parameter computerName when we compile the configuration. Type the following…
-
PowerShell DSC
The Desired State Configuration (DSC) is a management platform in a PowerShell that is used for development, configuration, and management of systems. PowerShell DSC was introduced in version 4.0. So, if you want to use it, you need a version 4.0 or above of PowerShell. It is available on Linux, Windows, and Nano Server. It provides…
-
Change the Execution Policy
Remove the ExecutionPolicy We can remove the execution policy for a particular scope by setting the execution policy to Undefined. Example: This example removes the execution policy for all the users of the local computer.
-
Manage the Execution policy
The output of the above command looks like this: The above command will display output as RemoteSigned
Got any book recommendations?