I have successfully setup an auto-backup when I deploy thru WebDeploy.
However, when it archives, it zips the whole "Default Web Site".
What I am looking for is a way to set the auto-backup to archive only that application.
Update1: My Current Setting
PS> Get-BackupSettings -SiteName "Default Web Site/Service1"
CanSetContinueSyncOnFailure : False
ExcludedProviders : {appPoolEnable32Bit, setAcl, appPoolPipeline, createApp...}
BackupPath : {SitePathParent}\{siteName}_snapshots
ContinueSyncOnFailure : False
CanAddExcludedProviders : False
NumberOfBackups : 5
Enabled : True
SiteName : Default Web Site/Service1
CanSetEnabled : False
CanSetNumberOfBackups : False
PS> Get-BackupSettings -SiteName "Default Web Site"
CanSetContinueSyncOnFailure : False
ExcludedProviders : {appPoolEnable32Bit, setAcl, appPoolPipeline, createApp...}
BackupPath : {SitePathParent}\{siteName}_snapshots
ContinueSyncOnFailure : False
CanAddExcludedProviders : False
NumberOfBackups : 5
Enabled : False
SiteName : Default Web Site
CanSetEnabled : False
CanSetNumberOfBackups : False
PS> Get-BackupSettings
CanSetContinueSyncOnFailure : False
ExcludedProviders : {appPoolEnable32Bit, setAcl, appPoolPipeline, createApp...}
BackupPath : {SitePathParent}\{siteName}_snapshots
ContinueSyncOnFailure : False
CanAddExcludedProviders : False
NumberOfBackups : 5
Enabled : True
SiteName :
CanSetEnabled : False
CanSetNumberOfBackups : False
Related
I am working with Microsoft 365 teams, channels and SharePoint Online sites/site collections. I have the Microsoft Graph API and the PnP.SharePoint PowerShell module at my disposal (among other APIs).
Private channels get their own SharePoint sites. I have the following data for the private channel:
> Get-PnPTeamsChannel -Team 9e0e388c-ad9e-40c4-a7f5-406060b175af | FL
Type :
Tabs :
TabResources :
Messages :
DisplayName : Private Channel
MembershipType : private
Description :
IsFavoriteByDefault :
Id : 19:2e708ed1ddee425fbcb6f509ea8d497c#thread.tacv2
Members :
I have the following data for the corresponding SharePoint site:
> Get-PnPTenantSite https://redacted.sharepoint.com/sites/Marketing-PrivateChannel | FL
AllowDownloadingNonWebViewableFiles : False
AllowEditing : True
AllowSelfServiceUpgrade : True
AnonymousLinkExpirationInDays : 0
BlockDownloadLinksFileType : WebPreviewableFiles
CommentsOnSitePagesDisabled : False
CompatibilityLevel : 15
ConditionalAccessPolicy : AllowFullAccess
DefaultLinkPermission : None
DefaultLinkToExistingAccess : False
DefaultSharingLinkType : None
DenyAddAndCustomizePages : Enabled
Description :
DisableAppViews : NotDisabled
DisableCompanyWideSharingLinks : NotDisabled
DisableFlows : NotDisabled
DisableSharingForNonOwnersStatus :
ExternalUserExpirationInDays : 0
GroupId : 00000000-0000-0000-0000-000000000000
HubSiteId : 00000000-0000-0000-0000-000000000000
InformationSegment :
IsHubSite : False
LastContentModifiedDate : 18.01.2022 07:44:15
LimitedAccessFileType : WebPreviewableFiles
LocaleId : 1031
LockIssue :
LockState : Unlock
OverrideTenantAnonymousLinkExpirationPolicy : False
OverrideTenantExternalUserExpirationPolicy : False
Owner : [REDACTED]
OwnerEmail : [REDACTED]
OwnerLoginName : [REDACTED]
OwnerName : [REDACTED]
ProtectionLevelName :
PWAEnabled : Disabled
RelatedGroupId : 9e0e388c-ad9e-40c4-a7f5-406060b175af
ResourceQuota : 300
ResourceQuotaWarningLevel : 200
ResourceUsageAverage : 0
ResourceUsageCurrent : 0
RestrictedToGeo : Unknown
SandboxedCodeActivationCapability : Disabled
SensitivityLabel :
SharingAllowedDomainList :
SharingBlockedDomainList :
SharingCapability : ExternalUserSharingOnly
SharingDomainRestrictionMode : None
ShowPeoplePickerSuggestionsForGuestUsers : False
SiteDefinedSharingCapability : ExternalUserSharingOnly
SocialBarOnSitePagesDisabled : False
Status : Active
StorageQuota : 26214400
StorageQuotaType :
StorageQuotaWarningLevel : 25574400
StorageUsageCurrent : 0
Template : TEAMCHANNEL#1
Title : Marketing - Private Channel
Url : https://redacted.sharepoint.com/sites/Marketing-PrivateChannel
WebsCount : 1
I cannot see anything sensible linking these two together.
I have found a way, but don't like it and don't know if it's reliable. I can make the following Graph API call:
https://graph.microsoft.com/v1.0/teams/9e0e388c-ad9e-40c4-a7f5-406060b175af/channels/19:2e708ed1ddee425fbcb6f509ea8d497c#thread.tacv2/filesFolder
{
"#odata.context": "https://graph.microsoft.com/v1.0/$metadata#teams('9e0e388c-ad9e-40c4-a7f5-406060b175af')/channels('19%3A2e708ed1ddee425fbcb6f509ea8d497c%40thread.tacv2')/filesFolder/$entity",
"id": "01C2YTDRBXDNT52I3PDBHYAWPR7R5ZFVHC",
"createdDateTime": "0001-01-01T00:00:00Z",
"lastModifiedDateTime": "2022-01-25T14:55:05Z",
"name": "Private Channel",
"webUrl": "https://redacted.sharepoint.com/sites/Marketing-PrivateChannel/Freigegebene%20Dokumente/Private%20Channel",
"size": 0,
"parentReference": {
"driveId": "b!oc1UdWZkGke6dY_CL8UCbH68JWN0VxpOmPzYFUC8hoMZ8jgTqQM5S5QHyRVAZnAR",
"driveType": "documentLibrary"
},
"fileSystemInfo": {
"createdDateTime": "2022-01-25T14:55:05Z",
"lastModifiedDateTime": "2022-01-25T14:55:05Z"
},
"folder": {
"childCount": 0
}
}
Now I could compare the returned webUrl of the filesFolder with the Url of the SharePoint site ("contains").
Is there another way or a better way? Thank you very much in advance.
You can use the tenant admin site to get the SharePoint URLs of the private channels. I wrote a description down in https://notdoneyet.blog/powershell/ms%20teams/2022/12/05/Find-private-channels.html
It's not really clear what you're wanting to actually do here, but in simple terms, yes, you could match them up this way. It's not really actually necessary to do that though - you can get the SharePoint Online site right from your filesFolder call. You have:
https://redacted.sharepoint.com/sites/Marketing-PrivateChannel/Freigegebene%20Dokumente/Private%20Channel
That follows a standard pattern:
https://[tenant].sharepoint.com/[something, but generally 'sites']/[the site part]/[document library name - note that this is language specific, like in your case it is in German]/[private channel name].
If you remove the last part [document library name/private channel name], you'll be fine. You can use regex or similar to that, grabbing the first part. Another option is to remove https and then split the string on / and grab part '2'.
db.LessonPlanConfiguration.deleteOne({'boardId' : ObjectId('5c270eec6c6d78001a206916') ,'gradeId' : ObjectId('5bc56a319fe946001a35d5d6') , 'topicId' : ObjectId('5c89de97d94fde0013b4983e')})
sample document :-
{
"_id" : ObjectId("5ca654a5c60baf0017130d26"),
"instituteId" : ObjectId("5bdfdb4bfdd9360013c5f063"),
"academicSessionId" : ObjectId("5c271edf6c6d78001a209880"),
"branchId" : ObjectId("5be6655120a8040014ddae80"),
"learningLevelId" : ObjectId("5bac973268a260001ec442d1"),
"boardId" : ObjectId("5c26ed9032f6bf001d5ce14b"),
"gradeId" : ObjectId("5bc56a319fe946001a35d5d6"),
"sectionId" : ObjectId("5959d07732018df843695f9b"),
"subjectId" : ObjectId("5c30c4b465b0850014691563"),
"topicId" : ObjectId("5c3c0a5889c70900188b9c74"),
"startDate" : ISODate("2019-03-31T23:59:50.000+05:30"),
"endDate" : ISODate("2019-04-06T23:59:50.000+05:30"),
"totalSessions" : 7,
"lastUpdatedBy" : ObjectId("5a1b996690be901900bc2584"),
"lastUpdationTime" : ISODate("2019-04-05T00:31:57.907+05:30"),
"createdBy" : ObjectId("5a1b996690be901900bc2584"),
"creationTime" : ISODate("2019-04-05T00:31:57.907+05:30"),
"validFor" : 0,
"isArchived" : false
},
i have a collection in which i want to delete documents by matching 3 conditions like
boardId
gradeId
topicId
i am using this query to delete one doc from collection but this query does not deleting the documents what am i doing wrong ?
I think your matchig conditions are not right,
I was able to delete document with proper matching conditions
db.LessonPlanConfiguration.deleteOne({'boardId' : ObjectId("5c26ed9032f6bf001d5ce14b") ,'gradeId' : ObjectId("5bc56a319fe946001a35d5d6") , 'topicId' : ObjectId("5c3c0a5889c70900188b9c74")})
Or you can also ,Try using Remove
db.LessonPlanConfiguration.remove({'boardId' : ObjectId("5c26ed9032f6bf001d5ce14b") ,'gradeId' : ObjectId("5bc56a319fe946001a35d5d6") , 'topicId' : ObjectId("5c3c0a5889c70900188b9c74")})
I am not able to understand what exactly is happening under the cover but whenever I run get-dscconfiguration reports consistency check is in progress. I want to know what is happening for it to be in a wait state for many days??
PS C:\OnlyOnMyPC\azure-automation> Get-DscConfiguration
Get-DscConfiguration : Cannot invoke the Get-DscConfiguration cmdlet. The Consistency Check or Pull cmdlet is in progress and must
return before Get-DscConfiguration can be invoked. Use -Force option if that is available to cancel the current operation.
At line:1 char:1
+ Get-DscConfiguration
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (MSFT_DSCLocalConfigurationManager:root/Microsoft/...gurationManager) [Get-DscConfigurat
ion], CimException
+ FullyQualifiedErrorId : MI RESULT 1,Get-DscConfiguration
PS C:\OnlyOnMyPC\azure-automation> Get-DscLocalConfigurationManager
ActionAfterReboot : ContinueConfiguration
AgentId : BD46B63B-BD33-11E8-92D9-8CDCD4247D7F
AllowModuleOverWrite : False
CertificateID :
ConfigurationDownloadManagers : {}
ConfigurationID :
ConfigurationMode : ApplyOnly
ConfigurationModeFrequencyMins : 15
Credential :
DebugMode : {ForceModuleImport, ResourceScriptBreakAll}
DownloadManagerCustomData :
DownloadManagerName :
LCMCompatibleVersions : {1.0, 2.0}
LCMState : Busy
LCMStateDetail : LCM is performing a consistency check.
LCMVersion : 2.0
StatusRetentionTimeInDays : 10
SignatureValidationPolicy : NONE
SignatureValidations : {}
MaximumDownloadSizeMB : 500
PartialConfigurations :
RebootNodeIfNeeded : False
RefreshFrequencyMins : 30
RefreshMode : PUSH
ReportManagers : {}
ResourceModuleManagers : {}
PSComputerName :
How to have this mystery resolved as soon as possble?
Thanks
I have three machine running on amazon cloud. I set the first primary set as follows
{
"_id" : "rs0",
"version" : 270805,
"members" : [
{
"_id" : 0,
"host" : "xxx.xxx.xxx.xxx:27017",
"priority" : 2
},
{
"_id" : 1,
"host" : "xxx.xxx.xxx.xxx:27017"
},
{
"_id" : 2,
"host" : "xxx.xxx.xxx.xxx:27017"
}
]
}
then the second machine will auto sync the config. however, the third machine will not synced the config.and all becomes [secondary]. when I set up the third machine rs conf using re.reconfig(conf, {force: true}). it will not set and throw error something like has a
config version >= to the new cfg version; cannot change config
I´m trying to use Azure AD as OAuth authorization provider. I have created an asp.net web application, just for testing, and registered an application in azure AD.
From the web site I created a web request to the authorize endpoint, the request sends fine, and I´m asked for credentials. After filling my user and password I always get this error:
An error occurred while processing your request.
HTTP Error Code:
400
Message:
ACS50000: There was an error issuing a token.
Inner Message:
ACS90027: Multiple principals match the
'ccf87be2-5370-4232-8453-0cadd770e3fe' identifier.
Trace ID:
0a79ca43-41c8-4e91-95ee-acb25cfd6053
Correlation ID:
e1396b28-868f-4e60-9a7d-9822f3b9d753
I think my request is ok, but I can't figure out what is happening, I´m sure there is only one application registered with that identifier. This is my request (I´m using get for testing purposes):
https://login.windows.net/[subscriptionid]/oauth2/authorize?resource=http://localhost&client_id=ccf87be2-5370-4232-8453-0cadd770e3fe&state=Windows%20Azure%20Active%20Directory&response_type=code&scope=http://localhost
updated
I downloaded the cmdlets, using Get-MsolServicePrincipal this is what I see, there are no duplicated principals:
ExtensionData : System.Runtime.Serialization.ExtensionDataObject
AccountEnabled : True
Addresses : {}
AppPrincipalId : 00000002-0000-0000-c000-000000000000
DisplayName : Microsoft.Azure.ActiveDirectory
ObjectId : 951bd0e5-23af-48e9-bda3-31ccce6a1a45
ServicePrincipalNames : {https://graph.windows.net,
00000002-0000-0000-c000-000000000000,
Microsoft.Azure.ActiveDirectory, 00000002-0000-0000-c00
0-000000000000/graph.windows.net...}
TrustedForDelegation : False
ExtensionData : System.Runtime.Serialization.ExtensionDataObject
AccountEnabled : False
Addresses : {}
AppPrincipalId : 00000010-0000-0000-c000-000000000000
DisplayName : Microsoft.Azure.GraphStore
ObjectId : 6b8ec6ad-5bc9-4256-b301-84825d77c542
ServicePrincipalNames : {00000010-0000-0000-c000-000000000000,
Microsoft.Azure.GraphStore, 00000010-0000-0000-c000-000
000000000/graphstore.windows.net}
TrustedForDelegation : True
ExtensionData : System.Runtime.Serialization.ExtensionDataObject
AccountEnabled : True
Addresses : {}
AppPrincipalId : 0000000c-0000-0000-c000-000000000000
DisplayName : Microsoft.Azure.ActiveDirectoryUX
ObjectId : feb2afcf-e82c-4d30-b0b8-7bd875c4bd94
ServicePrincipalNames : {0000000c-0000-0000-c000-000000000000,
Microsoft.Azure.ActiveDirectoryUX, 0000000c-0000-0000-c
000-000000000000/activedirectory.windowsazure.com}
TrustedForDelegation : True
ExtensionData : System.Runtime.Serialization.ExtensionDataObject
AccountEnabled : True
Addresses : {}
AppPrincipalId : 0000000f-0000-0000-c000-000000000000
DisplayName : Microsoft.Azure.GraphExplorer
ObjectId : 4eda2f9f-6f3c-4497-ae0c-8284fd53fff4
ServicePrincipalNames : {0000000f-0000-0000-c000-000000000000,
Microsoft.Azure.GraphExplorer, 0000000f-0000-0000-c000-
000000000000/graphexplorer.windows.net}
TrustedForDelegation : True
ExtensionData : System.Runtime.Serialization.ExtensionDataObject
AccountEnabled : False
Addresses : {}
AppPrincipalId : 00000013-0000-0000-c000-000000000000
DisplayName : Microsoft.Azure.Portal
ObjectId : 7a5289bf-60c9-4e08-aba0-cc5a9221b4c5
ServicePrincipalNames : {00000013-0000-0000-c000-000000000000,
Microsoft.Azure.Portal, 00000013-0000-0000-c000-0000000
00000/manage.windowsazure.net}
TrustedForDelegation : True
ExtensionData : System.Runtime.Serialization.ExtensionDataObject
AccountEnabled : True
Addresses : {Microsoft.Online.Administration.RedirectUri}
AppPrincipalId : ccf87be2-5370-4232-8453-0cadd770e3fe
DisplayName : Api
ObjectId : 570c934e-4215-4f09-a907-3bd35539080d
ServicePrincipalNames : {http://api.dnndev.me/,
ccf87be2-5370-4232-8453-0cadd770e3fe}
TrustedForDelegation : False
ExtensionData : System.Runtime.Serialization.ExtensionDataObject
AccountEnabled : True
Addresses : {Microsoft.Online.Administration.RedirectUri}
AppPrincipalId : a51f0618-a534-4f95-955e-d1ed7802bc69
DisplayName : pruebas
ObjectId : d5d4c74e-0212-49de-9bc2-928b630058d7
ServicePrincipalNames : {http://pruebas.dnndev.me,
a51f0618-a534-4f95-955e-d1ed7802bc69}
Thanks!