Skip to content

Instantly share code, notes, and snippets.

GSA artisticcheese

Block or report user

Report or block artisticcheese

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Get-VMs.ps1
# Retrieve all Public IPs
$AllPublicIPs = Get-AzureRMPublicIPaddress
# Retrieve all Virtual Networks
$vnetall = Get-AzureRMVirtualNetwork
# Retrieve all Network Interfaces
$nicall = Get-AzureRmNetworkInterface
# Retrieve all ARM Virtual Machines
$AllVMs = Get-AzureRMVM | Sort-object location, resourcegroupname, name
$StatusForAllVms = Get-azureRmVM -Status
View Get-AzureInventory.graphrunbook
{"SchemaVersion":"1.10","RunbookDefinition":"AAEAAAD/////AQAAAAAAAAAMAgAAAGJPcmNoZXN0cmF0b3IuR3JhcGhSdW5ib29rLk1vZGVsLCBWZXJzaW9uPTcuMy4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49MzFiZjM4NTZhZDM2NGUzNQUBAAAALE9yY2hlc3RyYXRvci5HcmFwaFJ1bmJvb2suTW9kZWwuR3JhcGhSdW5ib29rBQAAAApwYXJhbWV0ZXJzCmFjdGl2aXRpZXMFbGlua3MIY29tbWVudHMLb3V0cHV0VHlwZXMDAwMDA7IBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tPcmNoZXN0cmF0b3IuR3JhcGhSdW5ib29rLk1vZGVsLlBhcmFtZXRlciwgT3JjaGVzdHJhdG9yLkdyYXBoUnVuYm9vay5Nb2RlbCwgVmVyc2lvbj03LjMuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPTMxYmYzODU2YWQzNjRlMzVdXbEBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tPcmNoZXN0cmF0b3IuR3JhcGhSdW5ib29rLk1vZGVsLkFjdGl2aXR5LCBPcmNoZXN0cmF0b3IuR3JhcGhSdW5ib29rLk1vZGVsLCBWZXJzaW9uPTcuMy4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49MzFiZjM4NTZhZDM2NGUzNV1drQFTeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYy5MaXN0YDFbW09yY2hlc3RyYXRvci5HcmFwaFJ1bmJvb2suTW9kZWwuTGluaywgT3JjaGVzdHJhdG9yLkdyYXBoUnVuYm9vay5Nb2RlbCwgVmVyc2lvbj03LjMuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1Ymx
View a.json
"groups": "32df13c6-6e25-48e2-9b5e-63dd25f308dd,6a06581b-64b4-4a86-a590-5bb0e1f7a63b,52d47dae-80ce-4e3c-88b5-e1d57e39506e,0c6dbf57-8196-460d-b63b-f55647179c03,4cf3860a-5d4b-4f6f-bec1-bc2bbeec5ec9,a1812dba-2d31-4a1c-9cc2-7091672defc2",
"http://schemas.microsoft.com/identity/claims/identityprovider": "live.com",
"ipaddr": "47.184.55.63",
"name": "Gregory Suvalian",
"http://schemas.microsoft.com/identity/claims/objectidentifier": "6c19805a-8757-42ae-92de-02897cd7ccf9",
"puid": "10037FFE87760F28",
"http://schemas.microsoft.com/identity/claims/scope": "user_impersonation",
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier": "w8DgE14xt_N7LiCRKp_5Ib0OQL0G0s1lX6VUEzS95QU",
"http://schemas.microsoft.com/identity/claims/tenantid": "c0de79f3-23e2-4f18-989e-d173e1d403d6",
"http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name": "live.com#artisticcheese@gmail.com",
View request.json
{
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
},
"resource": {
"properties": {
View requestSchema.json
{
"properties": {
"createdDate": {
"type": "string"
},
"detailedMessage": {
"properties": {
"html": {
"type": "string"
},
View build.yaml
pool:
vmImage: Hosted VS2017
steps:
- task: CopyFiles@2
displayName: 'Copy Files to: $(build.artifactstagingdirectory)'
inputs:
SourceFolder: scripts
TargetFolder: '$(build.artifactstagingdirectory)'
- task: PublishBuildArtifacts@1
View gist:7467954280c1de6f3ceb2d2f0b1647c6
PS D:\ntt> $nicInfo.IpConfigurations.Count
2
PS D:\ntt> $nicInfo.IpConfigurations[0]
PrivateIpAddressVersion Name Primary PrivateIpAddress PrivateIpAllocationMethod Subnet Name PublicIpAddress Name ProvisioningState
----------------------- ---- ------- ---------------- ------------------------- ----------- -------------------- -----------------
IPv4 ipconfig1 True 10.233.0.4 Dynamic Succeeded
PS D:\ntt> $nicInfo.IpConfigurations.GetType()
View a.txt
pcb:s:ab1b03c9-6796-480b-9495-421bdfa43d47;EnhancedMode=1
full address:s:localhost
server port:i:2179
negotiate security layer:i:0
EnableCredSspSupport:i:1
allow font smoothing:i:1
allow desktop composition:i:1
audiocapturemode:i:1
audiomode:i:0
authentication level:i:2
View a.ps1
PS C:\Windows\system32> get-item "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Terminal Server\TSAppAllowList\Applications\Windows PowerShell\"
Hive: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Terminal Server\TSAppAllowList\Applications
Name Property
---- --------
Windows PowerShell Name : Windows PowerShell
Path : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
View a.ps1
PS C:\> get-VM | select -Property Name, State, VMID
Name State VMId
---- ----- ----
2016ServerCore Off 18f3b782-189f-4be7-8d09-254dc64c484d
Win10 Running ab1b03c9-6796-480b-9495-421bdfa43d47
Win2016 Off 469a3585-3fc0-4f72-b4d5-12cc7bbcbca9
You can’t perform that action at this time.