event

Create a new Event Log using PowerShell function

Find out how to create your own event log. Recently I was asked to prepare PowerShell script for generating custom events. In this article, I want to share with you how this can be done using a simple PowerShell function. Create a new Event Log You can create event using simple command Write-EventLog. To write an event to an event log, the event log must exist on the computer and …

Run SCCM client actions on remote machines using PowerShell script

It probably takes some time to run SCCM client actions on all machines in your environment. It’s getting more complicated when you have only server core machines. This is why I decided to write a PowerShell function for that. SCCM client actions Most common client schedule actions Hardware Inventory Cycle Software Inventory Cycle Discovery Data Collection Cycle (Send DDR) Machine Policy Retrieval & Evaluation Cycle Software Updates Deployment Evaluation Cycle …

Remove function from Azure Function

In todays article I want to share with you script for remove function from Azure function. I was looking for some ready Powershell command for removing function, but AzureRM module is very limited in this area. The only thing which I found was information that most of operation on Azure function is available via API (however is still very limited). You can find Kudu documentation on https://github.com/projectkudu/kudu/wiki/REST-API. How script works? …

Add Azure Function key using PowerShell

In today’s article I want to show you how to add Azure Function key using PowerShell. Azure Function keys allows to authorize and authenticate at the level of the entire application or a single function using keys. In my script I’ve added only option to set same key for all of the functions in application. All input parameters are mandatory, so remember to fill them all. Script: If you will …

Get domain role and PC type from remote computers

Today I want to show how to get domain role and PC type using PowerShell function. You can get this information easily using 1 liner script but results will be presented as numbers. Domain role and PC type Function is based on Get-WmiObject command and it query Win32_computersystem class. To get “PC type” and “Domain Role” using just one command we have to use Select-Object cmdlet after the pipeline: Unfortunelty …

Get Azure subscription quota limits using PowerShell

Today I want to show you function to gather Azure subscription quota limits. Recently for one of the customer I had a problem with quota limit for static IP addresses. Standard limit was reached quite quickly and I had to create support request in Azure to increase this limit. To be more proactive in the future I’ve created script which gather all Azure subscription quota limits and show usage in …

Get and set Azure WebApp IP restrictions using PowerShell

Today I want to share with you my 2 functions which will help you to manage Azure WebApp IP restrictions using PowerShell. IP restrictions in Azure WebApp allows define IPs from which WebApp / API will be available. All requests which will not match IPs defined in IP restrictions will be blocked. How functions works? Both functions are using Azure Resource Manager module in order to gather and set all …

Get AD System info remotely using PowerShell function

In this post you will find out how to get basic AD system information using PowerShell function. There are multiple articles on our blog describing plenty of Active Directory aspects. This time I want to show you another great function which helps discover useful data from remote systems. Get AD System Using below function you can get the following information: – Computername – DomainDNSName – DomainShortName – ForestDNSName – IsNativeMode …

Access Azure subscription using context

Recently I was a little bit annoyed by logging each time to Azure subscription, so I’ve preperaed the script to Access Azure subscription using context. What is context? Azure Context are metadata used to authenticate Azure Resource Manager requests. For more details please visit Microsoft docs site. How script works? Function which I prepared is used to save all contexts of Azure subscriptions assgined to account. As the input parameter …