Advanced Search
Search Results
6 total results found
Download Files from a Web URL
Download a file from the internet to your harddrive using Powershell. Invoke-WebRequest -Uri https://<path-to-internet-file> -OutFile <path-to-local-file>
Install Microsoft Office
Create a deployment package. If the files are publicly available, you can download from a web URL. Download the setup files according to the deployment config. ./setup-file.exe /download config-file.xml Install the applications according to the deploym...
Get Last Bootup Time
Get the last bootup time in Windows Powershell. Get-CimInstance -ClassName win32_operatingsystem | select csname, lastbootuptime
Check For Running Process
Check for a running process. If the process is not running, start it. #CHECK RUNNING PROCESS $Check = (Get-Service -Name <ServiceName> -ErrorAction SilentlyContinue -ErrorVariable ProcessError) Invoke-Command -ScriptBlock{ if($Check -eq $null) { W...
Create a Scheduled Task
To create a scheduled task in Windows Powershell that executes a Powershell Script. CREATE SCHEDULED TASK $action = New-ScheduledTaskAction -Execute "cd C:\path\to\script\location; ./script.ps1" $trigger = New-ScheduledTaskTrigger -At "8:15 pm" -Daily $pri...
Change Drive Letter in Powershell
Sourceshttps://devblogs.microsoft.com/powershell-community/changing-drive-letters-and-labels-via-powershell/https://chindara.medium.com/windows-10-powershell-to-assign-drive-letters-2dcb840191bb List all the disks. Get-Disk List all partitions for a specifi...