Hi Admins, I call this case; “find when was last seen” : ) … well there are some good news as AD store those information and I am going to show you how to fetch them. Using Active Directory Users and Computers (ADUC) You can find out the last logon time for the domain user… Continue reading How to Find Active Directory User’s/Computer’s Last Logon Time?
Author: user
.net versions
Hello, Jaber is here.. I was gathering Information about the installed .NET framework runtime and came to some conclusions that I want to share with you The easiest way to find all about dotnet is to open a powershell window and write the command dotnet –info that will show all versions of the current runtime… Continue reading .net versions
Get a scheduled task state locally or remotely
Hi again, you might be writting an automation script and running in a situation where you want to check status of a specific ScheduledTask. For that let me show you different ways to do that first way is the one I like 😉 I store the state in a variable and then use the ‘.’… Continue reading Get a scheduled task state locally or remotely
Get the Last Boot Time locally and remotely
the easiest way is executing the code below on the local machine SystemInfo | find /i “Boot Time” the output will show the date and time the computer was last rebooted at Notice that, you can run the code from a local machine to inquiry the last boot time of a remote machine, all what… Continue reading Get the Last Boot Time locally and remotely
Invoke
Hi this is Jaber, Invoke lets you execute PS commands on remote computers. Probably its the most important command when it comes to automations and windows administration! I will show you some use cases case 1, simple execution $computerName = “someName” Invoke-Command -ComputerName $computerName -ScriptBlock {#some PS command} case 2, execute with parameters. You will… Continue reading Invoke
Display all domains or Globalcatalogs within a forest
You might been in a situation where you find yourself troubleshooting issues in a largescale forest and want to keep an eye on the Domains and for that I am here to share with you something I use basically PS enables you to use the command GETADForest ; it will show all the essential information… Continue reading Display all domains or Globalcatalogs within a forest
Windows Management Framework Version
If you ever wanted to check what version WMF in a quick way, here is my tip for you: The installation package for PowerShell comes inside a WMF installer. Thus, the version of the WMF installer matches the version of PowerShell; so all what you need to do is to simpley query the PS version… Continue reading Windows Management Framework Version
Transfer Modules to an offline PC
Hi, in these days PowerShell Modules are often available to be installed online from PowerShell Gallery or as a from a (NuGet) Repository. In companies may exists computers which does not have an active internet connection. But how to install the modules on these devices? It’s possible by simply copying some folders 🙂 In this example… Continue reading Transfer Modules to an offline PC
The specified resource type cannot be found in the image file
While I was trying to read some system eventslog using Get-EventLog with Powershell, I got the below error with some (Not ALL) logs! my query is shown below $yesterday = (Get-Date).AddHours(-24) Get-EventLog -LogName “system” -After $yesterday below you see the error I got Get-WinEvent : The specified resource type cannot be found in the image… Continue reading The specified resource type cannot be found in the image file
Installing PowerShell Modules from a NuGet package offline
Hi again, Powershell scripts are often available in the web in a .nupkg file format. A NuGet package is a ZIP archive with extra files containing information about the contents of the package. Some browsers, like Internet Explorer, automatically replace the .nupkg file extension with .zip. To expand the package, rename the .nupkg file to… Continue reading Installing PowerShell Modules from a NuGet package offline